I have a booking form where the user will have the option of adding details for additional travelers. Is there a way I can change the page conditionally based on the number they select?
You can do this by putting a custom action on the element. For example, if you are using a select-list to show the number of travelers -- say from 1 to 6 -- your list would look like this:
0;1;1
0;2;2
0;3;3
0;4;4
0;5;5
0;6;6
For the purpose of this example, let's name the element NumberOfTravelers.
Then go to the Advanced tab of the select-list.
Type: CUSTOM
Action: CHANGE (third checkbox from the left)
function ff_NumberOfTravelers_action(element, action) { switch (action) { case 'change': if( element.value == '1' ) { ff_switchpage(7); } else if( element.value == '2' ) { ff_switchpage(2); } else if( element.value == '3' ) { ff_switchpage(3); } else if( element.value == '4' ) { ff_switchpage(4); } else if( element.value == '5' ) { ff_switchpage(5); } else if( element.value == '6' ) { ff_switchpage(6); } break; default:; } // switch } // ff_NumberOfTravelers_action
IMPORTANT: If your element is named something OTHER than NumberOfTravelers, then you need to change the function to match the name. For example, if your element is named Travelers, then the function line would change to: function ff_Travelers_action(element, action)