1

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 2

3

Using Jquery you will implement you requirement.

Code :

if($('input[name="De beers"]:checked'))
{
$("#Design").attr("required", "true");
}
3
  • Where this jQuery code be placed?
    – Asad Refai
    Commented 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
    Commented Jan 8, 2016 at 9:24
  • You have to place this jquery in Jslink .
    – Dipen Shah
    Commented Jan 8, 2016 at 9:25
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.