Код: Выделить всё
let validationMessage = '';
//$w('#button8').disable();
let schName = $w('#schoolName').value;
let schAddress = $w('#schoolAddress').value;
let schCity = $w('#schoolCity').value;
let schState = $w('#schoolState').value;
let schEmail = $w('#schoolEmail').value;
let schRegNo = $w('#schoolRegNumber').value;
let schPhoneNo = $w('#schoolPhoneNumber').value;
let schWebsite = $w('#schoolWebsite').value;
let isCheckedBox = $w('#tNa').checked;
let regButton = $w('#button8');
$w.onReady(function () {
//TODO: write your page related code here...
// Checking to see if all fields have values. If not disable button until it does.
if ((schName.length && schAddress.length && schCity.length &&
schState.length && schEmail.length && schRegNo.length && schPhoneNo.length && schWebsite.length === 0) && !isCheckedBox) {
regButton.disable();
validationMessage += 'All fields must be filled!\n';
} else {
regButtion.enbaled;
regButton.onClick((event) => {
formSubmission(event);
});
}
});
Подробнее здесь: https://stackoverflow.com/questions/617 ... th-entries