Transferring contact form input to an email account without using an email-proxy

The CF7 plugin uses WordPress built-in wp_mail() function which itself uses the PHPMailer class (github repo). The PHPMail github documentation states, The PHP mail() function usually sends via a local mail server, typically fronted by a sendmail binary on Linux, BSD and OS X platforms, however, Windows usually doesn’t include a local mail server; PHPMailer’s … Read more

Contact form 7 Dynamic text – placeholder on GET field

the Dynamic Text plugin cannot make what you need, but I use this code to write a new tag that you can use like that : [dynamictext_placeholder enquiry-product placeholder “placeholder text” “CF7_GET key=’product-name'” “before ‘%s’ after”] for that, create a new plugin with that : add_action( ‘wpcf7_init’, function () { wpcf7_add_form_tag( array( ‘dynamictext_placeholder’) , ‘wpcf7dtx_dynamictext_placeholder_shortcode_handler’ … Read more

How to save contact form 7 data in Custom Post Types (CPT) [closed]

If you want to save the Mail Content after the Contact Form was sent (or failed), you can use the wpcf7_mail_sent and wpcf7_mail_failed Hookes like this: add_action(‘wpcf7_mail_sent’,’save_my_form_data_to_my_cpt’); add_action(‘wpcf7_mail_failed’,’save_my_form_data_to_my_cpt’); function save_my_form_data_to_my_cpt($contact_form){ $submission = WPCF7_Submission::get_instance(); if (!$submission){ return; } $posted_data = $submission->get_posted_data(); //The Sent Fields are now in an array //Let’s say you got 4 Fields in … Read more

using 1 form shortcode (si or cf7) for all multisite sites [closed]

A Must Use plugin could do the work. This is just an outline and has to be fully tested: add_shortcode( ‘global_form’, ‘shortcode_wpse_87634’ ); function shortcode_wpse_87634() { // Main site, ID=1, that has the form switch_to_blog( 1 ); // Do your stuff $my_stuff = something(); // maybe do_shortcode // Back to original site restore_current_blog(); // Return … Read more

Horizontal (columned) Contact form 7 and acceptance field on devices

You need a two-third column CSS and a layout like this: ———————————————- | .two-third | .one-third | ———————————————- | .one-half | .one-half | | —————————–| Submit | | Name column | Email column | button | —————————–| column | | Acceptance column | | ———————————————- So the CSS rules: (the … means your code and … Read more

show image in mail contact form 7 [closed]

As per my comments, it seems you are trying to attach images to emails rather than ‘show’ them. Since you have [file* image filetypes:jpg|png|gif] what you need to do is put [image] in the ‘File Attachments’ box in the Contact Form 7 settings. This is from the Contact Form 7 File Uploading and Attachment doc.

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)