Contact form 7 Thank you resume page

I need a customized thank-you page, which will be displayed after sending the contact form (contactform7), the form will contain the name and email address entered by the user.

Below is an example of a thank you page:

Thank you, xxx: someone from our office will contact you via xxx@example.com within 24 hours.

+4
source share
1 answer

I figured out the solution using the additional settings of contact form 7 and placing the following code in these settings.



Note: it only works for Ajax based forms.

on_sent_ok: "var name = $('.wpcf7 input[name=your-name]').val();var email = $('.wpcf7 input[name=your-email]').val();$('.wpcf7').hide();$('.entry-title').html('Thank you');$('.entry-content').html('thank you '+name+' : someone from our office will get in touch with you via '+email+' within 24 hours.');" 



Open the contact form configuration page and paste the code above as shown below:

Additional Settings window

Output Example:

Sample output

+4
source

All Articles