No more than 3 conditional statements
-
As soon as I have more than 3 conditional statements, the conditional tests do not work.
I have a checkbox with 5 options and I need to show different fields depending on the option.
Here is the form I am using:
<div class="tm_pb_contact_form custom-form tm_pb_contact_form_container"> <h2 class="tm_pb_contact_main_title">Testing Form</h2> <label for="tm_pb_contact_name" class="tm_pb_contact_form_label">Your Name (required)</label> [text* your-name id:tb_pb_contact_name class:tm_pb_contact_form_input] <label for="tm_pb_email" class="tm_pb_contact_form_label">Your Email (required)</label> [email* your-email id:tm_pb_email class:tm_pb_contact_form_input] <label for="tm_pb_subject" class="tm_pb_contact_form_label">Subject</label> [text your-subject id:tm_pb_subject class:tm_pb_contact_form_input] <label for="tm_pb_message" class="tm_pb_contact_form_label">Your Message</label> [textarea your-message id:tm_pb_message class:tm_pb_contact_form_input] <label for="radio-yn" class="tm_pb_contact_form_label">Show Group 0</label> [radio radio-yn class:tm_pb_contact_form_input label_first use_label_element default:0 "Yes" "No"] [group group-0] <label for="Group0field" class="tm_pb_contact_form_label">Group 0 field</label> [text Group0field] [/group] [radio radio-316 class:tm_pb_contact_form_input label_first use_label_element default:1 "group 1" "group 2" "group 3"] [group group-1] <label for="Group1field" class="tm_pb_contact_form_label">Group 1 field</label> [text Group1field] [/group] [group group-2] <label for="Group2field" class="tm_pb_contact_form_label">Group 2 field</label> [text Group2field] [/group] [group group-3] <label for="Group3field" class="tm_pb_contact_form_label">Group 3 field</label> [text Group3field] [/group] [mc4wp_checkbox] [recaptcha] <p>[submit "Send" class:tm_pb_button class:tm_pb_bg_layout_light class:tm_pb_contact_submit]</p> </div>
and here is an export of the conditionals that work:
if [radio-yn] equals "Yes" then show [group-0] if [radio-316] equals "group 2" then show [group-2] if [radio-316] equals "group 1" then show [group-1]
As I was typing this, I tried something different and found that it starts to fail if you save the form with the conditional tab showing. If you switch back to the Form tab and save, then everything works. I’m not sure how changing the tab effects the output for the form, but it appears after 3 conditionals, saving doesn’t work properly when on the conditional tab
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘No more than 3 conditional statements’ is closed to new replies.