Hi, i have this form
http://www.screencast.com/t/4tWqqai5bpjM
the dropdown "Sede Installazione" depend from "Cliente" ( populated with DB Read onload )
the dropdownlist "Video Disponbili" depend from "Sede Installazione"
the dropdownlist "Video Associati" depend from "Sede Installazione"
when i select a value on "Cliente", i can see the values on "Sede Installazione" but not in "Video Disponibili" and "Video Associati"
to can see the value in "Video Disponibili" and "Video Associati" i have to change value on dropdown "Sede Installazione"...like that for the system is need to select manually
how can i fix ?
Hi ilmagowalter,
I'm not completely clear how this works or exactly what the problem is.
If you change Cliente than you have to add custom JavaScript to update the other three drop-downs. ChronoForms does not do this for you automatically. It might be simpler to make this a two-page form with the Cliente dropdown on page 1 and the other three on page 2 then you can set the required drop-down options in the On Load event for the second page.
Bob
this is the event configuration of id_cliente
http://www.screencast.com/t/frgA1AWJp
this is the event configuration of id_sede
http://www.screencast.com/t/heBkbx0lKMl
and this is the setup
http://www.screencast.com/t/HjVjdmBXC
this event works
the only problem is that the events on id_sede don't start when cliente is changed...
in fact when after cliente changed, i change a value of sede the events start and other 2 dropdown are populated
seems that when cliente is changed the system doesn't catch the event on id_sede...like that we don't have value selected on idsede...
is some code that i can add to force to select element in dropdown id_sede ?
another question
is possible force the execute of event "carica_video_disponibili" and "carica_video_associati" ?
( i tried an event loop after custom code of carica_id_sede but don't work )
Hi ilmagowalter,
If you change Cliente than you have to add custom JavaScript to update the other three drop-downs. ChronoForms does not do this for you automatically.
Bob
I am not very practical with javascript but i will try (obv i accept suggest🙂 )
another question
i tried to ask this form by link adding 2 parameter
ID_CLIENTE and ID_SEDE ( the fields in form have the same name of parameter )
i can see that ID_CLIENTE is correct but ID_SEDE no...maybe because ajax event on cliente "overwrite" the parameter ?
Hi ilmagowalter,
Normally a parameter in a URL will set the corresponding drop-down - I'm afraid that I don't know exactly what happens when you have dynamic options set for the drop-down as well. It may be that you need to set the value using JavaScript after the form has loaded. It depends on when the options are set.
Bob
Hi ilmagowalter,
The JavaScript needs to be in a Load JavaScript action before the HTML (Render form) action. The value of id_sede can either be passed as a hidden input in the form, or as a JavaScript variable - either way will work, the JS variable is probably neater.
Bob
can you make me a complete example of this ? i will pay you a coffee😉