I created a form with wizard where there are 3 dropdowns that are populated from database and that are realized using 2 DynamicDropdwon with ajax events and DBMultiRecordLoader as FAQ.
Problems is that for one of this the 3rd is necessary a "GET" as this:
GET index?option=com_chronoforms&chronoform=nameform&event=ajax¶meter1=value1stDropDown¶meter2=value2ndDropDown.
How can i get access of value1stDropDown in 2nd DynamicDropdown?
Andrew
Hi Andrew,
You should be able to access each of the parameter values using $form->data['parameter_name']
Bob
Hi,
with $form->data['parameter_name'] I have access data inside of Db MultiRecodLoader, and not inside value selected in DropdDown in form, it's correct? Ajax Event in custom code there is:
$mainframe =& JFactory::getApplication();
$par = $form->data['parameter_name'];
echo $par;
$mainframe->close();
In this code $par is empty but first in form i selected a value of 1st dropdown!
Tnx
Andrew
Hi Andrew,
You should be able to use the $form->data[] syntax in any form event and it will pick up parameters from the calling URL.
Bob
Ok now I understand, but in case how is it possibile from a second DropDown that calling URL is:
GET index?option=com_chronoforms&chronoform=nameform&event=ajax¶meter1=value1stDropDown¶meter2=value2ndDropDow
and not default:GET index?option=com_chronoforms&chronoform=nameform&event=ajax¶meter2=value2ndDropDow
Tnx
Andrew
Hi Andrew,
Where exactly do you want to use this? If that is the calling URL then both $form->data['parameter1'] and $form->data['parameter2'] should have values.
Bob