Forums

Dropdown Menu in a multiplier selection problem

Buyrukbilen 11 Jan, 2017
Hello,

I have a form which has a multiplier. In the multiplier contents I have 2 columns side by side. In the first column there are 4 dropdown menus, where three of them are parent hidden. The hidden ones are shown depending on the selection in the first one. For example:

The first dropdown menu has 3 options. Relative, Friend and Professional. If the "Relative" option is selected in the first dropdown then the hidden "Relative types" menu, which loads types from a database table, e.g father, mother, sister etc. is shown. If Friend is selected then second dropdown will show friend types. In the second column I have textboxes to be filled regarding the person with selected person type. (A Relative ---> Who is my Sister --> Name, Lastname, Dob, ...etc)

When I click on the plus button to add a new person, the secod dropdown menu is automatically shown depending on the selection in the first person. I mean, if I select a relative in the very first menu and fill the respective information, then click on the + button to add a new person, the conditionally shown dropdown menu shows relative types (father, mother etc) even the friend option is selected in the new added forms frist dropdown.

I am very new to joomla and chronoforms, any help will be greatly appreciated.

Thank you.
Max_admin 14 Jan, 2017
Hi Buyrukbilen,

There may be a conflict between the elements ids some where, I can't tell without checking the form.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Buyrukbilen 14 Jan, 2017
Hello Max,

I am very new to joomla and chronoforms. Could you give me a clue to check the ids of the elements? At least I can try to see if something is worng with the ids. If I cannot see the problem then we will try to find a way to make you look at the form. It is on my local right now.

Thank you.
GreyHead 14 Jan, 2017
Hi Buyrukbilen,

I don't think that you can do this using the Events code inside a Multiplier. The problem is that the events code is written before the form loads but you need it to apply to new select elements that are being generated in the multiplier.

You get get the result you want using custom JavaScript - there's an example in this post.

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