I have checkbox field "Department" with values ( De beers, Platinum, gold, silver) and another single line of text "Design". When any user select "De beers" from checkbox, then "Design" field should get mandatory and user could not submit the form. Please let me know if any javascript of jquery is available. Thanks
2 Answers
Using Jquery you will implement you requirement.
Code :
if($('input[name="De beers"]:checked'))
{
$("#Design").attr("required", "true");
}
-
Where this jQuery code be placed?Asad Refai– Asad Refai2016-01-08 09:23:56 +00:00Commented Jan 8, 2016 at 9:23
-
Design field need to be required if only Department = De beers, for rest value of department Design field need to be non required.Brishal– Brishal2016-01-08 09:24:23 +00:00Commented Jan 8, 2016 at 9:24
-
You have to place this jquery in Jslink .Dipen Shah– Dipen Shah2016-01-08 09:25:13 +00:00Commented Jan 8, 2016 at 9:25
What about no script at all and putting something like this Formula in the Validation settings:
=IF( AND( [Department]="De Beers" , ISBLANK([Design]) ) , FALSE , TRUE )
So SharePoint does what it can do