Hi Kiwiup,
You will need a different "edit" form (just copy your existing form), and you will need to use the "Dynamic data" section in the dropdown to load the dropdown with proper results using a "db read" action, there is a demo form about this feature!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thinking about this again, you don't need a new form, just configure the 2nd dropdown for dynamic data and use "db read" in your form, if a record is found then a list of options will be loaded, if not then just don't trigger the "db read", for this switching you may use an "Event switcher" action.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max.
thanks for your hints but I tried to figure out a solution and I didn't get it.
In my entri form (named exampledrop) for example one field is called dropdown2. I copied this form and renamed iin viewexampledrop and connected wirh CC5 called viewdrop (model id listexdrop). In the edit form (viewexampledrop) same field is called listexdrop['dropdwon2']. In this way if I change his value I can save it in the same table.
My problem, in the edit form, is how write a right code (custom code in ajax event) to show the value stored and the others value to select another if I made mistake in the first choice (entri from).
I followed your hints but I couldn't got anything.
Thanks a lot.
Kiwiup
Hi Kiwiup,
For loading existing results, you don't need to use AJAX, just use a "db read" action and use the "dynamic data" section in the dropdown as explained in other topics.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
thanks for your hint.
I solved partially the problem. Now when I open a record in edit form the dropdown element show a right values. But I lost a ajax event (Custom code) that connect a dropdown each other. In other words in the entry form when I choose a value in the first dropdown the second dropdown shows only a few element connected by id with the first dropdown. For example
first drpdown: id_reg, region;
second dropdown: id_pro,id_reg,province
third dropdown: id_com,id_pro,id_reg,town
So if I choose id_reg = 2 from first dropdown in the second one I have only 5 element to choose and so on.
If in the edit form I set a dynamic data for the seocnd dropdown when I open a edit form to modify a value for example for the seocnd dropdown I have all the values (109) of province.
How can I have only few elements in the edit form by according to a value selected in the first dropdown like in the entry form?
Thanks a lot.
Hi Kiwiup,
Your "db read" must have the correct conditions in the "Conditions" box in order to load the results matching the value of the first dropdown only, the conditions depends on your table, it may match the conditions used in the "db read" in the AJAX event.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.