Contact form db plugin customization

Use the remove_submenu_page function to remove the shortcode menu. Pass the parent menu’s slug and the submenu’s slug as arguments to this function. Paste the following in your theme’s functions.php file. add_action( ‘admin_menu’, ‘remove_short_code_menu’ ); function remove_short_code_menu() { remove_submenu_page( ‘CF7DBPluginSubmissions’, // $parent_menu_slug ‘CF7DBPluginShortCodeBuilder’ // $submenu_slug ); }

get_row returns empty when data exists

You have several things going on there and I may not be able to sort them all out. Unless $wpdb->cf7dbplugin_submits has been added to the $wpdb object your query won’t work. You will need something like {$wpdb->prefix}cf7dbplugin_submits instead but I can’t really guess at the right value. You don’t need to swap in 9999. That … Read more

Form is not getting submitted [closed]

First of all you are doing everything wrong as a WordPress developer. Make a habit of using wp_nonce and other security steps. When possible try to avoid inline JavaScript or JavaScript on the same file. Important: why you are creating new database connection..? Why you are writing database queries in your own way? Why don’t … Read more

Use Shortcode on Custom Page

You should this way to handle ajax request. It’s the recommended way to make a ajax call in WordPress. my_function.js Update your jquery with this code. jQuery(document).ready(function($) { $(‘#submit_payment’).click(function(e){ e.preventDefault(); var str = $(“form[name=season-form]”).serialize(); //alert(str); $.ajax({ type: “POST”, url: ‘//www.example.com/wp-admin/admin-ajax.php’, data: str + ‘&action=confirmRequest’ }).done(function(data){ $(“#result”).html(data); }); }); }); ajax_request_handling Paste this in functions.php of … Read more

how to auto fille conatct form 7 when user is logined

you can do with jquery like: <?php global $current_user; get_currentuserinfo(); echo ‘Username: ‘ . $current_user->user_login . “\n”; echo ‘User email: ‘ . $current_user->user_email . “\n”; echo ‘User level: ‘ . $current_user->user_level . “\n”; echo ‘User first name: ‘ . $current_user->user_firstname . “\n”; echo ‘User last name: ‘ . $current_user->user_lastname . “\n”; echo ‘User display name: … Read more

How to get specific table by current user login

Note that you may need to use WPDB::prepare() to prevent against SQL injections. Although, it might be arguable in your specific case… // If the query does not work, ensure the table name is correct… $table = $wpdb->prefix . ‘SaveContactForm7_1’; $reservations = $wpdb->get_results( $wpdb->prepare( “SELECT * FROM $table WHERE user = %s”, $username ) ); … Read more