R
R
Rustam Akimov2018-07-10 07:25:41
Yii
Rustam Akimov, 2018-07-10 07:25:41

How can the form be changed depending on the selected option?

It is necessary to change the form fields depending on the value of select'a, add additional. fields or clear them. Is there any plugin or material where you can read about it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Arman, 2018-07-10
@Arik

As an option to play around with scripts and conditional validations

M
Maxim Fedorov, 2018-07-10
@qonand

You can implement dynamic formation of a set of fields on the js side using the ActiveForm object. You can read more about how to work with the ActiveForm js object here.

V
Vlad Nevlad, 2018-07-10
@vladnevlad

it is possible pjax'om to redraw the form in principle.

M
Maxim Timofeev, 2018-07-10
@webinar

javascript (jquery or vue)
For example:

$('select').on('change', function() {
  alert( this.value );
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question