D
D
DragonChris2017-08-18 16:51:52
Yii
DragonChris, 2017-08-18 16:51:52

Yii2, active form, how to make the submit button unavailable until all fields are validated?

I'm using an active form widget and its ajax validation. How to make it so that the user could not send unvalidated data to the server. I think you can somehow get an ajax response, but I don't know how.
At the very least, you can check the existence of has-error in blocks.
Tell me what can be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-08-18
@qonand

At the JavaScript level, write the blocking and unblocking of the button as a reaction to the corresponding events .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question