Answer the question
In order to leave comments, you need to log in
How to build a complex form in yii2?
I need to make a form in which when selecting / entering different values, it changes.
Those. something appears, something leaves other fields of the form.
I haven't started doing it yet, but I've already run into difficulties.
1. I plan to hide/show form fields separately with a jquery script. Or is there another way, which is provided by the framework itself?
2. If in the model I describe the fields that are required. Hiding them out of sight on jquery, without receiving these values, the server will swear, how to get around, add your values to the script, then filter them in the controller? isn't that a crutch?
Answer the question
In order to leave comments, you need to log in
Or is there another way, which is provided by the framework itself?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question