How to add a placeholder to the protected post password input

This can be achieved via a hook, called the_password_form: function my_theme_password_placeholder($output) { $placeholder=”Hello!”; $search=”type=”password””; return str_replace($search, $search . ” placeholder=\”$placeholder\””, $output); } add_filter(‘the_password_form’, ‘my_theme_password_placeholder’); A str_replace searches for the string type=”password” inside the output. This gives an attribute to the <input> indicating it’s of type password. The replacement string contains the searched one plus the … Read more

How to move HTML form to WP Theme

use wp_enqueue_script() function to load your required javascript and css files for the form. Then follow this tutorial to have knowledge about creating a form plugin and how to use that. You have another option left. If you are familiar with WordPress page template then you can create a page template for the page that … Read more

WordPress Emails & Contact Forms [closed]

Your could debug php mailer in WP using franz’s wpmail_exceptions plugin https://gist.github.com/franz-josef-kaiser/5840282 Place the first file in /wp-content/mu-plugins/ and make sure you’ve set WP_DEBUG to true. You should test while logged in as administrator. Errors will be printed in main buffer so make sure to inspect any xhr requests if your form works asynchronously (Ajax). … Read more

Custom tables and using wpdb to insert into DB from a html form

You’re using a placeholder (“%s”) in your SQL for prepare, but you don’t pass it a value to put in place of that placeholder, hence the complaint. use $wpdb->prepare(“SELECT … %s”, $myvalue) And I’m pretty sure your other error stems from you passing in a DateTime object. $wpdb will not convert that automatically, it expects … Read more

Complex Timesheet Form

I would suggest looking at the gravity forms plugin. It will allow you to have a pdf emailed or stored in the database.

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 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