user2742362
user2742362

Reputation: 21

display submit button until errs removed

I am writing a rails form using simple_form, client_side_validations and bootstrap.

Is there a simple way to automatically disable the summit button until all the the displayed errors have been removed

Upvotes: 0

Views: 35

Answers (1)

Sabyasachi Ghosh
Sabyasachi Ghosh

Reputation: 2785

you can create a div and put all the error message inside that div. you can check using jquery that if the div length is not zero then disable the submit button else enable it.

Upvotes: 2

Related Questions