Help! Required field does not work in custom form

Hello,

I want the user to complete all fields before having access to continue and submit custom form. However, I don’t know how to write this using code.

I have already enabled ‘Required field’ via elements General settings, but it does not work.

Can someone please help?

Hi

If you are using the wix data api to submit the form then you need to check for the elements validity before allowing them to submit.

Hi Shan and thank you for your message!

Apologies, how do I do what you advise?

So far, this is what I have when the user selects the button to continue with form:

function showQuestion2() {
$w(‘#slideshow1’).changeSlide(1);
}
export function button5_click(event) {
showQuestion3();
}

Can someone please help?