A simple form submission but notice : Trying to get property of non-object
A simple form submission but notice : Trying to get property of non-object
A simple form submission but notice : Trying to get property of non-object
Does the code that imports to the external DB need to be on a different page? Adding a conditional that checks if the form is submitted, to your callback function would work as well. Then your form posts the data back to itself, checks if the form is submited and runs the import script instead … Read more
if(is_user_logged_in()) { /…/ } else { // your message or // redirect to registration form }
Those are some dangerous words “public…can enter data directly to the DB” You could write your own form and use wp_insert_post() Something like this: $new_post = array( ‘comment_status’ => ‘closed’, ‘ping_status’ => ‘closed’, ‘post_author’ => 1, // id of admin, or some other user ‘post_title’ => $_POST[‘title’], ‘post_name’ => $_POST[‘title’], ‘post_status’ => ‘draft’, ‘post_type’ => … Read more
The better way to do this is using javascript/jquery. Use either javascript webstorage api or jquery ajax $.post. Webstorage api will be good for this. Here how you can do it. $(‘body’).on(‘click’, ‘.button.small’, function(){ var index = $(this).parents(‘table’).index(‘table’); var cur_workshop = $(this).parents(‘.innercontent’).find(‘h3’).eq(index).text(); localStorage.setItem(‘workshop’, cur_workshop); }); Place above script on http://yft.ac/upcoming-workshops/ this page template. Then call … Read more
Add a field on your registration form <label for=”secret_reg_code”>Secret Code: </label> <input type=”text” name=”secret_reg_code” id=”secret_reg_code” value=”” /> then in your plugin file or in function.php add define(‘MY_SECRET_REG_CODE’, ‘fdsfgadsfgdf’); function check_for_reg_secret_code($errors, $sanitized_user_login, $user_email) { if ( defined(‘MY_SECRET_REG_CODE’) && trim($_POST[‘secret_reg_code’]) != MY_SECRET_REG_CODE ) { $errors->add( ‘secret_code_error’, __(‘<strong>ERROR</strong>: Enter a valid code postal code.’, ‘your_text_domain’) ); } return … Read more
This isn’t really a wordpress issue and will probably get a better response be in the Stack Overflow PayPal page: https://stackoverflow.com/questions/tagged/paypal However, from what I’ve understood of your question, you want to know how to pass values from your form to PayPal? To do this, you need to populate hidden fields and ‘send’ these to … Read more
There are lots of contact form plugins, which you can find by searching the repository on wordpress.org.
Your form doesn’t contain the fields you think it does. Use FireBug or a similar tool (even var_dump($_POST)) to see what is actually being posted. Your num_users is a setting group, not a single field. At best the field with the value will be user_main_settings field. The previous commenter is also correct – checking for … Read more
I figured out what I needed to do. I needed if(isset( $_POST[ ‘tdgmt_plugin_noncename’]) && wp_verify_nonce( $_POST[‘tdgmt_plugin_noncename’], plugins_url( __FILE__))){ to be above if($screen->base == ‘settings_page_tgdmt_options_page’){ as well as fixing my typos of tdgmt_plugin_noncename instead of tgdmt_plugin_noncename