I want to make a dropdown box where if you choose one option, it will go to one URL, option #2 would redirect them to a different URL, option #3 to yet another URL, and so on. Is that possible?

First, create a select-list element. For the purpose of this example, we will name the element Choose.

In the 'List' field of the element, put:

0;Choose Page;
0;Choice1 Title;Page 1
0;Choice2 Title;Page 2
0;Choice3 Title;Page 3

 

(Replace 'Choice1 Title' / 'Choice2 Title' / 'Choice3 Title' with whatever text you want to show in the dropdown list.)

Now go to the Advanced tab of your select-list element. In the Actionscript section, make these changes:

Type: Custom

Actions: Change (the third checkbox from the left)

In the Create Code Framework textbox, enter the following code:

 

function ff_Choose_action(element, action)
{
     switch (action)
     {
          case 'change':
          if( element.value == 'Page 1' )
          {
               location.href="http://YourFirstLink.com";
          }
          else if( element.value == 'Page 2' )
          {
               location.href="http://YourSecondLink.com";
          }
          else if( element.value == 'Page 3' )
          {
               location.href="http://YourThirdLink.com";
          }
          break;
          default:;
     } // switch
} // ff_Choose_action

 

 Remember to replace the location.href URLs with your actual page links.

NOTE: If you name your element something other than "Choose," then you will need to change the first and last line of the code to match your element name, by replacing the ELEMENTNAME text to the actual name of your element:

 

function ff_ELEMENTNAME_action(element, action)

 

and at the end of the code:

 

} // ff_ELEMENTNAME_action 

 

Now click on the SAVE PROPERTIES button at the bottom of the screen to save the element you just created, and then click on the SAVE icon in the upper right-hand corner of the screen to save the form itself.

Test it out -- you should now have a dropdown list that will 'jump' to whatever page you want. :-)

This same principle can be applied to sections, too. As long as you identify the unique ID number assigned to the section or element, you can define a style for it.

 

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!