Hi everyone.
Time to time a create dynamic forms.
e.g.
We have country and states (two dropdownslist).
So I want states
to be changed when user pick another country. And for some country there is no predefined states, in that case I want to place there textInput.
Obviously javascript can perform this. But I would like to do it on php side only. So when country
dropdown is changed, make AJAX request and replace existed form with given one.
To avoid misunderstanding, I do understand how to do it.
But I would like to know if there is something that could help me ? I mean some property for ActiveForm maybe? Or something else?
I ask it because I am positive that I am not the first who run into that problem.
I am considering extending ActiveForm for that purpose, but before that I want to know other opinions.
Any suggestion would be helpfull.