Topic: mdb vue 4.8.1 form submission isn't working

frederick valone free asked 6 years ago


I installed mdb vue 4.8.1 unintentionally and now forms that would pass an event to the loginUser(event)
function when using @submit.prevent="loginUser" this code works fine in 4.5.0. An y thoughts on whats wrong?

 <form id="loginform" class="needs-validation" @submit.prevent="loginUser">
          <modal-header class="primary-color white-text">
            <h4 class="title"><fa class="fa fa-user" />User Login</h4>
          </modal-header>
          <modal-body class="grey-text">
            <p class="h4 text-center mb-4">Sign in</p>
          <label for="defaultFormLoginEmailEx" class="grey-text">Your email</label>
          <input type="email" id="emailAddress" v-model="loginInfo.emailAddress" class="form-control" required/>
            <div class="invalid-feedback">
              Please enter your email address.
          </div>
          <br/>
          <label for="password" class="grey-text">Your password</label>
          <input type="password" id="password" v-model="loginInfo.password" class="form-control" required />
            <div class="invalid-feedback">
              Please enter a pasword.
          </div>
            <div class="red-text" id="validationMsg" v-show="showAlert"> {{ validationMsg }} </div>
          </modal-body>
          <modal-footer>
            <btn color="secondary" @click.native="closeModal">Close</btn>
            <btn color="primary" @click.native="addUser(loginInfo)" v-show="showAddUser">Add User</btn>
            <btn color="green" type="submit"><i class="fa fa-check white-text fa-1x"></i> Submit </btn>
          </modal-footer>
        </form>

Mikołaj Smoleński staff answered 6 years ago


Hi there,

I am not sure if this is connected with MDB Vue update. There are no mdb-inputs in Your code. Do You have any errors in Your console (F12)?

Best Regards


frederick valone free commented 6 years ago

Well I am just trying to do a regular form submit the code worked in version 4.5.0 just fine but the submit does nothing in the new version... There is no event.target values and the bound variables are not even updated.  I did re-write the form and got it working but I did not expect there would be any need to do that.


Mikołaj Smoleński staff commented 6 years ago

Is Your form working now? What did You change to make it work again? If You tell us, we could find a solution for the future releases.

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

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 4.6.0
  • Device: pc
  • Browser: all
  • OS: unix, win 10
  • Provided sample code: No
  • Provided link: No
Tags