• Resolved joannaaustria

    (@joannaaustria)


    Hi,

    As you can see in the bottom page form, I have this conditional fields setup to show when the user choose in the dropdown. The fields inside are required. But why is the form still sending even this fields isn’t filled out.

    Let me know asap. Thanks.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    use conditional tags in the email:

    [persongroup-2]
     ...
    [/persongroup-2]
    [persongroup-3]
     ...
    [/persongroup-3]
    Thread Starter joannaaustria

    (@joannaaustria)

    Hi,

    Thanks for a prompt response!

    What do you mean Jules?
    This my cf7 form code.

    
    
    <div class="mapic-form">
    
    <label>[text* your-name placeholder "First Name *"]</label>
    
    <label>[email* your-email placeholder "Email *"]</label>
    
    <label>[text* your-phone placeholder "Phone Number *"]</label>
    
    <label>No. Of Seats [select* seats "1" "2" "3" "4" "5"]</label>
    
    [group group-2]
    
    <div class="group">
    
    <div class="group-item">
    <h5>Guest 2</h5>
    <label>[text* your-name-2 placeholder "First Name *"]</label>
    
    <label>[email* your-email-2 placeholder "Email *"]</label>
    
    <label>[text* your-phone-2 placeholder "Phone Number *"]</label>
    
    </div>
    
    </div>
    
    [/group]
    
    [group group-3]
    
    <div class="group">
    
    <div class="group-item">
    <h5>Guest 2</h5>
    <label>[text* your-name-2 placeholder "First Name *"]</label>
    
    <label>[email* your-email-2 placeholder "Email *"]</label>
    
    <label>[text* your-phone-2 placeholder "Phone Number *"]</label>
    
    </div>
    <div class="group-item">
    <h5>Guest 3</h5>
    <label>[text* your-name-3 placeholder "First Name *"]</label>
    
    <label>[email* your-email-3 placeholder "Email *"]</label>
    
    <label>[text* your-phone-3 placeholder "Phone Number *"]</label>
    
    </div>
    
    </div>
    
    [/group]
    
    [group group-4]
    
    <div class="group">
    
    <div class="group-item">
    <h5>Guest 2</h5>
    <label>[text* your-name-2 placeholder "First Name *"]</label>
    
    <label>[email* your-email-2 placeholder "Email *"]</label>
    
    <label>[text* your-phone-2 placeholder "Phone Number *"]</label>
    
    </div>
    <div class="group-item">
    <h5>Guest 3</h5>
    <label>[text* your-name-3 placeholder "First Name *"]</label>
    
    <label>[email* your-email-3 placeholder "Email *"]</label>
    
    <label>[text* your-phone-3 placeholder "Phone Number *"]</label>
    
    </div>
    <div class="group-item">
    <h5>Guest 4</h5>
    <label>[text* your-name-4 placeholder "First Name *"]</label>
    
    <label>[email* your-email-4 placeholder "Email *"]</label>
    
    <label>[text* your-phone-4 placeholder "Phone Number *"]</label>
    
    </div>
    
    </div>
    
    [/group]
    
    [group group-5]
    
    <div class="group">
    
    <div class="group-item">
    <h5>Guest 2</h5>
    <label>[text* your-name-2 placeholder "First Name *"]</label>
    
    <label>[email* your-email-2 placeholder "Email *"]</label>
    
    <label>[text* your-phone-2 placeholder "Phone Number *"]</label>
    
    </div>
    <div class="group-item">
    <h5>Guest 3</h5>
    <label>[text* your-name-3 placeholder "First Name *"]</label>
    
    <label>[email* your-email-3 placeholder "Email *"]</label>
    
    <label>[text* your-phone-3 placeholder "Phone Number *"]</label>
    
    </div>
    <div class="group-item">
    <h5>Guest 4</h5>
    <label>[text* your-name-4 placeholder "First Name *"]</label>
    
    <label>[email* your-email-4 placeholder "Email *"]</label>
    
    <label>[text* your-phone-4 placeholder "Phone Number *"]</label>
    
    </div>
    <div class="group-item">
    <h5>Guest 5</h5>
    <label>[text* your-name-5 placeholder "First Name *"]</label>
    
    <label>[email* your-email-5 placeholder "Email *"]</label>
    
    <label>[text* your-phone-5 placeholder "Phone Number *"]</label>
    
    </div>
    
    </div>
    
    [/group]
    
    <p style="text-align: right;">[submit "RESERVE MY SPOT NOW"]</p>
    
    </div>
    
    
    Plugin Author Jules Colle

    (@jules-colle)

    If you don’t want to show the groups that were not visible during form submission, you should add this to your email message:

    [group-1]
    your name: [your-name-1]
    your email: [your-email-1]
    [/group1]
    [group-2]
    your name: [your-name-2]
    your email: [your-email-2]
    [/group2]
    ...

    Please check the tutorial if it’s still not clear: http://bdwm.be/wpcf7cf/how-to-set-up-conditional-fields-for-contact-form-7/

    Thread Starter joannaaustria

    (@joannaaustria)

    No Jules. What I meant is how is the form sending with the required fields not filled up? The form should not work unless the required fields in the conditional group is filled up.

    2018-04-23_1624

    Plugin Author Jules Colle

    (@jules-colle)

    I see, the problem is that you have the same field name multiple times in your form.

    For example, you have a field called your-name-2, appearing 3 times. You need to change this to

    your-name-1-2
    your-name-2-2
    your-name-3-2
    

    Same for all the other fields. there can not be any duplicates.

    Thread Starter joannaaustria

    (@joannaaustria)

    It’s resolved Jules thanks a lot!! πŸ™‚

    Plugin Author Jules Colle

    (@jules-colle)

    you’re welcome! feel free to leave a review if you like the plugin. πŸ˜‰

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Conditional Fields Required Not Working!’ is closed to new replies.