Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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


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


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



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

  • ForumUser: 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