There are two things that I am struggling to get to grips with and have not found the right info so far in the guides or forum, and certain that someone must of asked this before.
1) Dynamic Fields.
Example, if Option1 is selected from the first drop down, then a particular field is displayed, if option2 is selected then a different field is displayed. If nothing is selected then none of the fields are displayed.
2) Dynamic data in fields.
How to use a specific DB table as the source to display in a drop down.
Example: jos_suppliers contains field called "supplier" so I would like a drop down containing the suppliers name.
Any pointers would be much appreciated.
Thanks calculus00
In How to load record data from a database table into your form, it suggests to use the DB Read action, but I do not see it.
Under the Data/DB Operations Actions, there are Data To Session, DB Multi Record Loader, DB Record Loader, DB Save and Session To Data.
Does that guide need to be updated?
Simon
An Update.
So I finally found the Dynamic Dropdown, in the Actions section, I was looking in the elements section😟
I have created a map of relations between the expected drops downs for the form, then create the drop down elements.
In Events, I have added a Dynamic Drop down and entered the field ID for the source and the target.
When I view the front end, I can see all my source drop downs and they are populated the the manually entered data from the options of each field.
The target drop down is not picking up on the data as it contains nothing.
More to follow.
This is a useful resource, which I initially ingnored based on the title and expectation that Dynamic Dropdowns would be its own resource.
http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2647-how-do-i-build-a-select-drop-down-radio-button-or-checkbox-group.html
Hi Simon,
So which tasks you still need to resolve ?
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hey Max,
Both but at the moment but I am concentrating on the dynamic data loaded from another drop down and I think I have gotten myself confused.
I am using this http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/2647-how-do-i-build-a-select-drop-down-radio-button-or-checkbox-group.html as reference from the Dynamic Data List.
At the moment, I have created a series of drop down elements which contains the select options, which should act as the sources to drive the targets. These will have to be hidden from the front end form too.
For example, I have a suppliers drop down, the top level, (ID= "suppliers") containing SupplierA, SupplierB, SupplierC.
When one of these options is selected then one of 3 drop downs should be displayed, such as ID= "supplierAproducts" or "supplierBproducts" or "supplierCproducts".
These 2nd level drop downs contain product category types for each supplier and again, once an option is selected then the next related, 3rd level dropdown should be displayed, then there is a 4th level too.
This is where I am confused, I am not sure now how to link these together.
Should I enable all the drop downs form elements to Dynamic data.?
Do I have to create a series of Dynamic drop down actions and set every source and target?
I am not exactly sure what should be placed in the Data Path, Value and Text key options?
I am also quite happy, once I have sussed this out, to write up my notes and create an FAQ for you to explain this for others.
Any guidance is much appreciated.
Hi Simon,
The "dynamic data" extracts an array of data from the form data array and uses it to publish the dropdown (or checkbox group).
In order to do this extraction, you have to provide the path under which this data array exists in the form data array, we usually use a "DB Multi record loader" with a specific model name to load the data from the table, then use the same model name as the data path, you will also need to provide 2 fields names, one for the dropdown options values, and one for the texts.
I hope this clarifies it ?
You may also install v5 (and keep v4 installed as they work together fine), v5 comes with demo forms built in, you can inspect the dynamic dropdown form!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Simon,
Just as an extra comment to add to Max's. You said "When one of these options is selected then one of 3 drop downs should be displayed, such as ID= "supplierAproducts" or "supplierBproducts" or "supplierCproducts"."
A dynamic dropdown uses just *one* drop-down for this but changes the options list that is displayed.
Bob