Disabled Button for from validation


Topic: Disabled Button for from validation

jay2jam pro asked 5 years ago

Hello,

is there a way to disable button, until form is not valid?

Rgds Stefan


jay2jam pro answered 5 years ago

This is doing the job :-)

https://baianat.github.io/vee-validate/

Maybe also interesting for you :-)


Mikołaj Smoleński staff commented 5 years ago

Thanks for letting us know, Stefan!

Rgds


Mikołaj Smoleński staff answered 5 years ago

Hi there,

There is a way, but You'll have to code Your own form verification functions and add 'disable' attribute to button conditionally.

Best regards


jay2jam pro answered 5 years ago

Hi, isn't there a function or a return. When i try this:

    event.preventDefault();
    event.target.classList.add('was-validated');

i always get an undefined. Also when the form is valid or no. Normally i should get something like true or false, or not?

When i add:

         <div class="valid-feedback">
                     Looks good!
         </div>

It is also display:none.

Rgds Stefan


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 4.8.1
  • Device: MAC
  • Browser: CHROME
  • OS: Moave
  • Provided sample code: No
  • Provided link: No