I want to change the value of other 2 fields on checking the checkbox.
I have a field called “Cancelquery”->checkbox.
If its checked then i want to
- automatically set the value of the field “Status” -> Cancelled and
- automatically select value of the “Reason” field to be “Other”.
Am using model for this fields so the name and id of each field is created automatically.
Eg. $form->checkBox($model,'CancelQuery')
Any help?
You’ve to specify the additional html options that you want for your checkbox to be rendered. In your case you can try the following:
And in your js zone, a function like the following: