Hi everybody, i'm trying to have working the following form:
Preview
.....some text box before ....
1)first dropdown: Field Name: user_sport_id | Field ID: sportsDrop | Show Empty : Selezionare Sport
2)second dropdown: Field Name: user_ruolo_id | Field ID: rolesDrop | Show Empty : Selezionare Ruolo
3)third dropdown: Field Name: user_categoria_id | Field ID: categoriesDrop | Show Empty : Selezionare Cateogia
.....
Events
On on_load event i have 3 DB multi record loader event for the 3 dropdowns above and 2 dynamic dropdown event:
1) Source ID: sportsDrop | Target ID: rolesDrop | AJAX event : sportsDrop_changed
2) Source ID: rolesDrop | Target ID: categoriesDrop | AJAX event : rolesDrop_changed
On the AJAX events I have(the code is almost the same for both events):
sportsDrop_changed)
1)DB FIeld: sport_id(foreign key field of the table of the second drop down) | Request Param: user_sport_id
2)Custom code:
1)DB FIeld: ruolo_id(foreign key field of the table of the third drop down) | Request Param: user_ruolo_id
2)Custom code: ----
Now: when i select on the first or second dropdown the "Show Empty" value i've on the connected dropdown this:
--------------------------------------------------------------
"http://www.w3.org/1999/xhtml" xml:lang=
"viewport" content
"content-type" content
"generator" content...
.........
---------------------------------------------------------------
Using the firefox debugger I noticed that the "call index.php?option=com_chronoforms&chronoform=gestione_anagrafica_ita-2&event=sportsDrop_changed" have success and the responsetxt is the content of the *php file.
I have another form with 3 dropdown and when i select the Show Empty value the following dropdowns simply remain empty...
I really don't understand where i'm wrong on this form.
Does anybody can help me?
Thank you very much.
Preview
.....some text box before ....
1)first dropdown: Field Name: user_sport_id | Field ID: sportsDrop | Show Empty : Selezionare Sport
2)second dropdown: Field Name: user_ruolo_id | Field ID: rolesDrop | Show Empty : Selezionare Ruolo
3)third dropdown: Field Name: user_categoria_id | Field ID: categoriesDrop | Show Empty : Selezionare Cateogia
.....
Events
On on_load event i have 3 DB multi record loader event for the 3 dropdowns above and 2 dynamic dropdown event:
1) Source ID: sportsDrop | Target ID: rolesDrop | AJAX event : sportsDrop_changed
2) Source ID: rolesDrop | Target ID: categoriesDrop | AJAX event : rolesDrop_changed
On the AJAX events I have(the code is almost the same for both events):
sportsDrop_changed)
1)DB FIeld: sport_id(foreign key field of the table of the second drop down) | Request Param: user_sport_id
2)Custom code:
<?php $results = array(); // the next line set the first 'nothing selected' option. $results[] = '-1=Selezionare Ruolo'; foreach ( $form->data['RolesDataModel'] as $v ) { $results[] = $v['id'].'='.$v['ruolo_nome']; } $results = implode("\n", $results); //Ritorno dei valori echo $results; //Stop esecuzione $mainframe =JFactory::getApplication(); $mainframe->close(); ?>rolesDrop_changed)
1)DB FIeld: ruolo_id(foreign key field of the table of the third drop down) | Request Param: user_ruolo_id
2)Custom code: ----
Now: when i select on the first or second dropdown the "Show Empty" value i've on the connected dropdown this:
--------------------------------------------------------------
"http://www.w3.org/1999/xhtml" xml:lang=
"viewport" content
"content-type" content
"generator" content...
.........
---------------------------------------------------------------
Using the firefox debugger I noticed that the "call index.php?option=com_chronoforms&chronoform=gestione_anagrafica_ita-2&event=sportsDrop_changed" have success and the responsetxt is the content of the *php file.
I have another form with 3 dropdown and when i select the Show Empty value the following dropdowns simply remain empty...
I really don't understand where i'm wrong on this form.
Does anybody can help me?
Thank you very much.