Forums

Pre-select dropdown field from URL parameter

OlliMuc 28 Dec, 2014
Hi there!

What's the recommended way to pre-select a dropdown field from a parameter passed on by the URL with CF V5?
This is what I'd like to achieve:

- Have a dropdown field (non CF) on one of my pages that redirects to a ChronoForm with the selected item passed on by an URL parameter (?option=123)
- On the new page with the ChronoForm, the chosen dropdown item should be pre-selected.

As an example: I have a dropdown installed in module position with the options apples, oranges and bananas. The dropdown redirects to a ChronoForm with a set of dropdown options (apples, oranges, bananas, pineapples & lemons) - the chosen item should be pre-selected here.

I've been able to do this with CF V4 in a quite complicated fashion that had me use custom code and didn't leave me with the option of using the designer. I'm pretty sure there must be an easier way to achieve the same results in a much more elegant way using CF V5. Any input is appreciated!
GreyHead 29 Dec, 2014
Hi OlliMuc,

Give the drop-down the same name as the parameter that you are passing in the URL. That's all you need.

Bob
This topic is locked and no more replies can be posted.