Creating a contact form without a plugin [closed]

This is my very simple implementation of contact form: class WPSE_299521_Form { /** * Class constructor */ public function __construct() { $this->define_hooks(); } public function controller() { if( isset( $_POST[‘submit’] ) ) { // Submit button $full_name = filter_input( INPUT_POST, ‘full_name’, FILTER_SANITIZE_STRING ); $email = filter_input( INPUT_POST, ’email’, FILTER_SANITIZE_STRING | FILTER_SANITIZE_EMAIL ); $color = filter_input( … Read more

Adding a hyperlink to the checkbox in the contact form 7 [closed]

It should work like said in my comment but maybe an even better way would be to use the acceptance filed-type that is build especially for that kind of checkboxes. [acceptance term_and_conditions class:required] I can confirm I have read and accepted the <a href=”http://www.your-domain.com/terms-page”>Terms and Conditions</a>.[/acceptance] In the contact form 7 edit page go to … Read more

How to choose email recipient in Contact Form 7 based on address state input in form and save to database [closed]

Thanks to Michael Simpson, from Contact Form DB. The solution is listed (kind of hidden) on the Contact Form DB website in the article – CF7 Menus with Pipes Add to functions.php function myFilter($formData) { // Change $formData return $formData; // be sure to return it } add_filter(‘cfdb_form_data’, ‘myFilter’); function location_form_handler($formData) { $formName=”ExtendedContact”; // change … Read more

How can I send to multiple Contact Form 7 recipients based on form input? [closed]

No need to write any code, Contact form 7 has features of Additional Headers in the Mail section. In that you just need to write the email’s header inside the Additional headers textbox in Mail(Second Tab) section. Put this inside the Additional Headers textbox. Cc: [friend1-email], [friend2-email], [friend3-email], [friend4-email], [friend5-email] OR You can alter the … Read more