Make Field required
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
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
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
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;
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests