Forums

How to make Dynamic Dropdown to Multiple Target Field

adhynagara 31 Mar, 2015
Controlling field: Country
Options:
1. US
2. UK


Target field #1: City
If Country=US, then
1. NYC
2. LA
If Country=UK, then
1. London
2. Manchester


Target field #2: Landscape
If Country=US, then
1. Empire State Building
2. Time Square
If Country=UK, then
1. Big Ben
2. London Eye


So, I want to make Country field controls both City and Landscape fields w.

I've tried the tutorial http://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.html
And filled in the fields like these:
On=US
Set Options City
NYC=NYC
LA=LA

On=US
Set Options Landscape
Empire State Building=Empire State Building
Time Square=Time Square

But it crashed my form instead...😟
Please help! Thank you in advance...
Max_admin 01 Apr, 2015
Hi,

How did it crash your form ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
adhynagara2 01 Apr, 2015
Thank you for your response.

My form just stopped working properly.
The features of all other fields just disappeared. Even the "required" validations also vanished.

Cmiiw, but I guess it is because the event defined for controlling fields can not be set more than once. Like what I did, I can't set the event of US for City and Landscape options simultaneously. When I removed the Landscape options (leaving only one set options for US), the form recovered.
Max_admin 01 Apr, 2015
There is no reason for the config to be lost when the same event is set more than once, if you can supply some screenshots then this may help us understand the problem better.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
adhynagara2 02 Apr, 2015
I was surprised when I worked with my Joomla this morning, a strange advert popped up from my window.
From there I wonder if my computer got attacked by a virus. And yes, when I tried to construct the form with another computer (protected by Kaspersky), the form worked like a charm.
Sorry for having added a silly enquiry in this forum. I am good now.
Thank you for this amazing extension.
adhynagara2 02 Apr, 2015
I have just figured one important thing.
The dynamic feature won't work if apostrophe is used in the options list/ajax event. It even crashes the form.
GreyHead 02 Apr, 2015
Hi adhynagara2,

Quotes are best avoided in strings like options because they can cause odd problems that are hard to find. If they are needed you can usually get them to work using an escape character e.g. \' or an HTML Entity e.g. ’

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