Hello,
I would like to build a form with double dropdown elements. The values of the second dropdown will depend of the values of the first one, all of them stored in my joomla database. I don’t want to use DB Read/DB Load actions, just SQL statements, because there will be many nested “where” criteria.
Having read many relevant posts in this forum, I have successfully:
- populated my first dropdown
- created the following simple Load JS action inside the “OnLoad” event, which get the id value, when a user select a value in the first dropdown:
jQuery(document).ready(function($){
$("#item").change(function() {
my_selected_item=$("#item").val();
});
});
I have just limited javascript knowledge, and what I am wondering is how to pass the my_selected_item value (taken from the aforementioned Load JS action), in the custom code of another event.
The custom code will have the SQL statement which will populate my second dropdown and the my_selected_item value will be used in its “where” criteria.
The event in which the above custom code will be used is based on your example "demo-dynamic-dropdown" (included in ChronoForms Component v5)
I will appreciate very much your help
Thank you/Alexandra
I would like to build a form with double dropdown elements. The values of the second dropdown will depend of the values of the first one, all of them stored in my joomla database. I don’t want to use DB Read/DB Load actions, just SQL statements, because there will be many nested “where” criteria.
Having read many relevant posts in this forum, I have successfully:
- populated my first dropdown
- created the following simple Load JS action inside the “OnLoad” event, which get the id value, when a user select a value in the first dropdown:
jQuery(document).ready(function($){
$("#item").change(function() {
my_selected_item=$("#item").val();
});
});
I have just limited javascript knowledge, and what I am wondering is how to pass the my_selected_item value (taken from the aforementioned Load JS action), in the custom code of another event.
The custom code will have the SQL statement which will populate my second dropdown and the my_selected_item value will be used in its “where” criteria.
The event in which the above custom code will be used is based on your example "demo-dynamic-dropdown" (included in ChronoForms Component v5)
I will appreciate very much your help
Thank you/Alexandra