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)

 

 

 

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!