How do I disable a button when user does not enter or select an element value in custom form?

Make it disabled by default (on the properties panel).
Then enable it after validation:

$w("#input1").onChange((event) => {
    $w("#input1").valid ? $w("#button1").enable() : $w("#button1").disable();
})//use your own property id's

Hi J.D.

I’ve just tried that, but when I select a value within the element and then press Next, it doesn’t take me to the next slide/question.

Make sure you put it inside $w.onReady() function. Like this:

$w.onReady(function () {
    $w("#dropdown1").onChange((event) => {
        $w("#dropdown1").valid ? $w("#button2").enable() : $w("#button2").disable();
    })
})

That’s great, thank you!

But, what should the code be for this…


I would like all three elements completed, before the user can submit the form.

@jonatandor35 Hello Sir, i have seen your code and it works, thank u but how can i use several input requirements? before the button enabled

@amar97dwarka I could help you do what you’re trying to do but you will need to open a new post per the community guidelines , instead of bumping old posts. Create a new post and share your current code and you will get some help.