Mandatory Fields

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

03 Mar 2017

Hi,

i have a choice field Yes / NO (Radio buttons). If one of both (Yes or No) of the choice field is marked, the field Name and Status should be mandatory. Thanks for your assistance.

Best wishes

Tom

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

07 Mar 2017

Hi Tom,

Here is a sample:

Code: Select all

if (fd.field('YesNo1').value() && fd.field('YesNo2').value()) {
    if (!fd.field('Name').value() || fd.field('Status').value()) {
        alert('Fill-in both Name and Status!');
        return false;
    }
}

return true;

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests