hi
this is an extension of another post i have about a booking form set up.
what i want is for the first form to ask a question.
(drop down box)
are you a member ?
yes
no
if they select yes i want them to goto form1
if they select no i want them to goto form2
am i goign to need an if statement somewhere for this or something on the submit button (in this case a next button) ?
i have this code for it
thanks for the great support
this is an extension of another post i have about a booking form set up.
what i want is for the first form to ask a question.
(drop down box)
are you a member ?
yes
no
if they select yes i want them to goto form1
if they select no i want them to goto form2
am i goign to need an if statement somewhere for this or something on the submit button (in this case a next button) ?
i have this code for it
<div class="form_item">
<div class="form_element cf_heading">
<h2 class="cf_text">Booking Form</h2>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"></span> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_radiobutton">
<label class="cf_label" style="width: 150px;">Are you a member?</label>
<div class="float_left">
<input value="Yes" title="" class="radio validate-one-required" id="radio00" name="radio0" type="radio" />
<label for="radio00" class="radio_label">Yes</label>
<br />
<input value="No" title="" class="radio validate-one-required" id="radio01" name="radio0" type="radio" />
<label for="radio01" class="radio_label">No</label>
<br />
</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Next" name="button_3" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
thanks for the great support
Hi barnold,
Don't think in terms of going to form 1 OR form 2 - using multi-page it's simpler to always go to Form 2 but to have Form 2 show the appropriate inputs using an 'if' or a 'switch'.
Bob
Don't think in terms of going to form 1 OR form 2 - using multi-page it's simpler to always go to Form 2 but to have Form 2 show the appropriate inputs using an 'if' or a 'switch'.
<?php
if ( $posted['radio00'] == 'Yes ) {
?>
// some inputs
<?php
} else {
?>
// some other inputs
<?php
}
?>
Bob
thanks i guess it would make things much easier..
ill give it a go and see what happens
do they if statements go in the html part or the javascript part of the form code or does it not matter to much ?
regards
ill give it a go and see what happens
do they if statements go in the html part or the javascript part of the form code or does it not matter to much ?
regards
This topic is locked and no more replies can be posted.