Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
JS (jQuery). We listen to the change event in the select, then several options:
- ajax request, getting the necessary form fields (html + js via ->renderAjax(
)
- the fields are already in a separate block, we just hide and show the blocks
- there is a config in the form of json, it contains field selectors, which should be shown when the option is selected.
There is also a simple, but not userFrandly option, when changing the select results in a get request with a parameter, which simply regenerates the page. But if there are problems with js, this option may turn out to be simple.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question