Buy Now
Sign in

Dynamic Dropdown not working

4Summit , August 27 at 01:50
Answered
4
4Summit

Hello, I have two form drop downs. Category and Sub Category. Values for both the fields are obtained from the database. Based on what the user selects for Category, i want to dynamically populate the drop down for Sub Category. I reviewed the latest manual and followed the instructions (Trigger for reload, reload form event, etc), but it is not working.

It appears the reload event (on change) is not being triggered for some reason.

I created read_data section in the reload_event to pulling values for subcategory.

I tried the following to pass the user selected category to where clause for the sub category.

Data13.goal_category_id:{data:select8}

Data13 is the model name, and select8 is the ID for form field Category.

I double/triple checked everything, but not able to get this working.

Please help if I have missed a step.

calculus00

Hello 4Summit,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Dynamic dropdown options
P.S: I'm just an automated service ;)

I'm an automated service, my answers may help, but they may not be accurate.

admin

Hello 4Summit,

Are you sure that you have applied all the settings correctly ?

The new update has a dynamic dropdown demo form which you can test after installation, hopefully it will be available later today or tomorrow.

Best regards,
Max

Max
If your main question got answered then please mark the answer using the button!

4
4Summit

Hello Max,
I downloaded the latest version and could not see the dynamic down example, but noticed that i needed to add "#" before the trigger form field (in the tip within the setup, so may want to update the document with this). Now the code is firing for the dynamic drop down, but for whatever reason, the data short code {data:category_id} is not working. category_id is the name of the first drop down field in the form. The query has an empty value and not fetching anything from the DB.

It will be helpful to see an example for sure. Please let me know when the example is available.

admin

Hello 4Summit,

The demo form is under the "Demos" button in the forms manager, it should be the last one, named "Dynamic dropdown".

Best regards,
Max

Max
If your main question got answered then please mark the answer using the button!