Forum Moderators: open

Message Too Old, No Replies

How to block Submit button when input cells as empty?

         

toplisek

9:14 am on May 18, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have seen simple solved solution how to block link at button (Submit button) when form is not with all values.

Example: class disabled.

How to do it actually in Javascript as usually (in the past) it will work validation only when you click Submit button. In this case it is blocked link till you fill in all input values.

jinxed

10:25 pm on May 27, 2015 (gmt 0)

10+ Year Member



Have the initial state as disabled on page load.

Create a function that checks if all the input values are populated after any change to an input field.

If yes, remove the disabled state.

incrediBILL

5:02 am on Aug 5, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



use this code, just reverse it to look for the value(s) to be empty instead of full
[webmasterworld.com...]