Page 1 of 1

Make Field required

Posted: 25 Oct 2016
by TWendt
Hi,

i have a choice Field (Radio buttons) Approved / Not approved. If this field is selected, the people picker field should be a required field. I use this in the JS editor.

fd.onsubmit(function() {
if (fd.field('PME_x002d_Freigabe').value() && !fd.field('PME_x002d_Name').value()) {
alert('Bitte wählen Sie ihren Namen aus / Please, select your name.');
return false;
}

return true;
});

But it does not work. Where is the error?

Best regards

Tom

Re: Make Field required

Posted: 25 Oct 2016
by YuriyMedvedev
Please, use this code

Code: Select all

fd.onsubmit(function() {

if (fd.field('PME_x002d_Freigabe').value() && !(fd.field('PME_x002d_Name').value().length)) {

 alert('Bitte wählen Sie ihren Namen aus / Please, select your name.');

 return false;

}

return true;

});