Forums

Redirect to different pages based on dropdown choiches

damconsulting 18 Apr, 2017
Hi, i’m using CF5 for a website that shows user manuals.
I’d like to use dropdown choices to select language and product: is it possible to have submit button linked to different pages based on the two choices selected above?
Thank you.
DAM
havex 18 Apr, 2017
Hi Dam,

This is very possible with CF5.
I have seen few threads here that explains how to do it.
Give the search function a try.

Have a look at this FAQ, it's almost exactly what you're looking for.

Good luck
damconsulting 18 Apr, 2017
Ok, thank you.
I followed the tutorial and it works if I use only one choice.

How can I concatenate choices?
I have two dropdown:
1) language_switch -> that can assume 'ita' or 'eng' value;
2) product_switch -> that can assume from 'option_01' to 'option_18' value;
for a total of 36 pages.

I created 36 events in "Setup" tab of my form and I add 36 redirect action, one for each event.

I think I have to edit the code in "Event switcher". Can anyome give me a suggestion?
Thank you.
DAM
Max_admin 19 Apr, 2017
Hi DAM,

It's not a good idea to create 36 events with 36 actions, you can make a dynamic redirect, if your urls are named correctly then you can use this in the redirect url:
http://www.domain.com/index.php

And in the parameters:

language:{data:language}
product:{data:product}

The end result would be something like this:
http://www.domain.com/index.php?language=eng&product=option_06

But the url will be totally dependent on the fields choices.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
damconsulting 19 Apr, 2017
Ok, thank you, but now the redirect are done...
Any idea on how I can concatenate choices?
Thank you
Max_admin 19 Apr, 2017
If you want to get a value like this: option_01_eng

Then you can use:
param:{data:product}_{data:language}

And your redirect url will have: ?param=option_01_eng

You should not have 36 events with code for this simple task!🙂

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.