M
M
Michael2020-09-01 15:40:37
Yii
Michael, 2020-09-01 15:40:37

Showing a form field only when a specific value of another field is selected, out of the box?

I have a model field fieldFirst, select.
And the second field.
the second field should be offered for filling only with a certain choice from the list of the first field.
I know how to set conditional validation through when.
But the display / disappearance of the field itself Second, is there such a thing out of the box?
Well, not to write your own js for this form.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton R., 2020-09-01
@Nolan81

You change display: none in the style via js and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question