contact-form-7

How to apply if satement and calculate in JavaScript

删除回忆录丶 提交于 2019-12-06 15:13:34
问题 How can I apply the if statement and calculate a set of radio buttons using JavaScript? It works as of now with adding up the total. but I would like it to apply the $150.00 off only when they select yes. Here is the radio buttons that I am trying to work with. <p>Baby Plan<br /> [radio BPSUBPT id:BPSUBPT class:radio-vertical "Baby Plan $300.00 3 Sessions" "Baby Plan $500.00 4 Sessions"] </p> <p>Did you have a Newborn session With ADP? <br /> [radio BPSUPQ id:BPSUPQ class:radio-vertical "Yes

How to change data before sending in Contact form 7?

风格不统一 提交于 2019-12-06 14:11:23
问题 I have contact form on my website. And I need to change the value of one field before sending mail. For example name . I try like this: function contactform7_before_send_mail( $cf7 ) { $cf7->posted_data['your_name'] = 'John Doe'; } add_action( 'wpcf7_before_send_mail', 'contactform7_before_send_mail' ); But in the email comes the value that is specified in the form. 回答1: Recently faced the same problem. There is a field in this form called "[s2-name]" for example. When a visitor submit out a

How do I check if email submitted via Contact form 7 exists in my database?

可紊 提交于 2019-12-06 11:17:08
问题 When customer submits email via contact form 7, how do I check if email already exists in my database and change notification message to "Your email already exists in our database" So far I have tried using before_send hook, but when I click submit, the page just hangs and no confirmation message. Below is the function I have in my functions.php add_action( 'wpcf7_before_send_mail', 'check_email' ); function check_email( $cf7 ) { $email = $cf7->posted_data["email"]; if($email == 'Is in our

How to use Wordpress Contact Form 7 in my own HTML?

匆匆过客 提交于 2019-12-05 22:30:50
问题 I want to use Wordpress Contact Form 7 on my website, but I already have an HTML/CSS layout for it. So, I want to modify the plugin to use it with that custom HTML code. <form id="contact_form" action="" method="post"> <div> <label for="contact_name">Nombre</label> <input id="contact_name" type="text" required aria-required="true" placeholder="Nombre"> </div> <div> <label for="contact_email">Email</label> <input id="contact_email" type="mail" name="email" required aria-required="true"

Custom validation is not working in Contact Form 7 in ver 4.1.1

穿精又带淫゛_ 提交于 2019-12-05 16:59:33
I have to make a form with custom validation field in contact form 7. It is not working with latest version (4.1.1) of Contact Form 7 but working in older version. I have created a field for getting coupon code from the form. I want to validate the entry if the coupon is started from "HIP". My code is given below: add_filter( 'wpcf7_validate_text', 'your_validation_filter_func', 999, 2 ); add_filter( 'wpcf7_validate_text*', 'your_validation_filter_func', 999, 2 ); function your_validation_filter_func( $result, $tag ) { $type = $tag['type']; $name = $tag['name']; if ( 'coupon_code' == $name ) {

Contact Form 7 and Custom post type

回眸只為那壹抹淺笑 提交于 2019-12-05 08:29:58
I want to use contact form 7 in Wordpress to build a order Form. I want the content of the order Form to be populated with content from a custom post type "trade Show Material" - The post type contains the fields "name" "number" "description" "photo" . The idea will be that each piece can be selected from the form . Can anyone offer the general direction for this? Should I perhaps be using another plugin entirely? Maybe you can use the wpcf7_form_tag filter hook for this. If you want to use a custom post type as the options of a dropdown (select) you can add something like the example below in

Contact form 7 Datepicker, date range between 2 dates

六月ゝ 毕业季﹏ 提交于 2019-12-05 07:21:56
问题 I would like to have two date field in my Wordpress contact form 7. A start-date and an end-date. The fields will be datepickers from the "Contact Form 7 Datepicker" plugin. When visitor has selected a start-date he should only be able to select an end date that is 4 days later then the start-date. How can I achieve this by only using the "contact form 7" form creator? 回答1: This is the syntax I put in the "contact form 7". Start date charter*: [date* date-start date-format:MM_d_yy] End date

calculating check boxes

荒凉一梦 提交于 2019-12-04 21:49:56
I am facing a problem in contact form 7, and I would like to have some help. The problem that I am having is that I have a set of Check boxes that I would like to have a total show when a client clicks on it. MY Check box: (multiple select ) can pick more then one [checkbox GRCGA class:multipal use_label_element "$10.00" "$20.00" "$25.00" "$50.00" "$75.00" "$100.00" "$200.00" "$400.00" "$500.00"] Total Amount: <span id="total">$00</span>.00 Jvascript: $("input[type=checkbox]").change(function(){ updateTotal(); }); function updateTotal(){ var total = 0; $("input[type=checkbox]:checked").each

PHP code inside Contact form 7 Email template

风流意气都作罢 提交于 2019-12-04 20:31:11
Is there any way to insert PHP code inside contact form 7 Email Template? I want to make footer copyright year as dynamic in it. This is possible by using the wpcf7_before_send_mail hook. In your functions.php you can use the following code: add_action( 'wpcf7_before_send_mail', 'wpcf7_add_text_to_mail_body' ); function wpcf7_add_text_to_mail_body($contact_form){ // get mail property $mail = $contact_form->prop( 'mail' ); // returns array with mail values // add date (or other content) to email body $mail['body'] .= date('Y'); // set mail property with changed value(s) $contact_form->set

Download File after submission in Contact Form 7 Wordpress

你离开我真会死。 提交于 2019-12-04 20:18:11
I am trying to make one form which give functionality like when user enter name and email,then PDF file starts download automatically. And while i am applying this code in additional setting tab on submit button,it replay the error message like this. I am currently working in local machine, i know error is in contact form 7 mail tab,but don't know how to fix it? "There was an error trying to send your message. Please try again later." Here is my contact form 7 code: <label> Name [text* your-name] </label> <label> Email [email* your-email] </label> [submit "Download Now"] Here is code that i