Dynamic Double Drop Down - Strange Behaviour in the second dropdown

rmpaolillo 24 Feb, 2015
Hello Everybody,

I am using the latest Chronoform V5.08 to date together with Joomla 2.5.28.

I am trying to reproduce with CF V5 a multiple drodown I already have with CF V4 for selecting Regioni->Province->Comuni->CAP (regions,provinces,towns,zip) .

My previous form in CFv4 can be seen live here:
http://marcostest.it/index.php?option=com_chronoforms&chronoform=regione_province_comuni_cap
and it works great.

I have just built a double dropdown to start with by following the FAQ http://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.html but I am stuck.

The problem is that when I select the first dropdown, the second populates randomically: sometimes it does populates correctly and sometimes doesn't at all. This behaviour is strange since it is not related to the first dropdown choice.

For instance if I choose "Puglia" in the first dopdown I might have an empty list "province" in the 2nd dropdown but if I play around choosing other regions in the first dropdown and later I go back to "Puglia" I might see all the provinces associated to the Puglia region which is the expected behaviour.

I enclose the form together with the SQL dump files I have used.

I do not know if this is a bug. I have tried with different browsers and the result does not change. I have not tried with Joomla 3.3.

Any suggestion is appreciated.

Regards.

Marco
rmpaolillo 24 Feb, 2015
Here is the live version of CFv5.08 form with the problem described above.

http://marcostest.it/index.php?option=com_chronoforms5&chronoform=treble_dropdown
GreyHead 27 Feb, 2015
Answer
1 Likes
Hi rmpaolillo,

If you look at the page using your browser web developer tools you will see that two Ajax requests are being made simultaneously to the same URL - one of those returns the results you want the other one returns an empty result set. I think it is then a matter of chance which one of these is used so you sometimes get options and sometimes get nothing.

Please check the setup to see why two requests are being made.

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