Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aareyes00's avatar

Disable button vuejs 2 + bulma

Hi. I need to disabled first the submit button before proceeding to next page but I can't seem to disabled it using v-bind.I tried disabled only on the element but I need to put it inside a method which will be enabled after that executed.

Here's my code

<router-link tag="a" to="/shipper/shipping-reservation-summary" active-class="is-active" href="/shipper/shipping-reservation-summary" class="button is-primary" @click.native="submit" v-bind:disabled="disabled"> Review and Confirm </router-link>
0 likes
1 reply
jlucia's avatar

Is there a condition that needs to happen before you want the button to become active? If so, set the v-bind:disabled="that.condition".

For example, I have a form that defaults the submit button to be disabled until you check a checkbox on the form. It looks like this.

<button class="btn btn-primary" :disabled="! form.checked.length" @click.prevent="purchase">
    Purchase
</button>

Please or to participate in this conversation.