how to insert textbox value in existing database table in wordpress?

Though you haven’t mention the process and WP tables to insert textbox values in existing WP table. Either you can used option table or postmeta table for your purpose. For option: WordPress provides two specification API functions for writing data to the database. One comes in the form of adding information, one comes in the … Read more

How to display success message correctly and delete it when the page is refreshed

You’re looking for Flash Messages. Flash Messages are messages stored in session and deleted right after they are retrieved. You can find some implementation on github: https://github.com/plasticbrain/PhpFlashMessages <?php // Start a Session // Read about managing session with WordPress // Instantiate the class $fm = new \Plasticbrain\FlashMessages\FlashMessages(); // Process form e.g. send an email and … Read more

How to validate my form

$table = wp_save; This is setting $table to a PHP constant wp_save. If I had to guess I’d say you don’t actually have a constant by that name, and just meant to set the table name to wp_save. To do that you need to put the table name between quotes, so that it’s a String: … Read more

Radio&Checkbox buttons Contact form 7 not clickable

Please use below html and shortcode in the contact form .you missed the checkbox and radio button values <div class=”custom-control custom-radio”> [radio customRadio id:customRadio1 class:custom-control-input “value4″] <label class=”custom-control-label” for=”customRadio1″>Something</label> </div> <div class=”custom-control custom-radio”> [radio customRadio id:customRadio2 class:custom-control-input “value5″] <label class=”custom-control-label” for=”customRadio2″>Something</label> </div> <div class=”custom-control custom-checkbox”> [checkbox checkbox1 id:customCheck1 class:custom-control-input “Value1″] <label class=”custom-control-label” for=”customCheck1″>Something</label> </div> <div … Read more

Output multi-steps form results in same page

You will need a function that will handle the sent data from the form. Then you have to attach this function to the wp_ajax_nopriv_[your_action_name] hook. function process_form() { // process $_POST data, prepare $output to return // // send: array( ‘success’ => true, ‘data’ => $data ) wp_send_json_success( $data ); wp_die(); } // add_action( ‘wp_ajax_my_action’, … Read more