Make Field required

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
TWendt
Posts: 109
Joined: Mon Sep 08, 2014

25 Oct 2016

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

YuriyMedvedev
Moderator
Posts: 33
Joined: Wed Sep 21, 2016

25 Oct 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;

});

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests