- Make these input elements required either via the editor or by code:
let inputs = [$w("#input1"), $w("#input2"),/*etc..*/];
inputs.forEach(e => e.required = true);
Then don’t insert unless all the inputs are valid:
let inputs = [$w("#input1"), $w("#input2"),/*etc..*/];
//..inside the sendButton.onClick event handler
if(inputs.every(e => e.valid)){
//wixData.insert() .....
} else {
//show "Fiil in the rest of the fields" message
}