0

My Situation:

I have a SharePoint list with a couple of fields used to make a printer directory.

A the moment i have the Yes/No field "Network printer" to determine if i have to collect additional data like IP address and sub net. So far i just have this field marked as not mandatory and change the input form in InfoPath so that hides them as soon as someone chooses "No" in the network printer choice, so the end user knows that he does not have to fill this information in.

My Problem:

I'd like that when the user chooses "Yes" that he can not add the item to the list until this technically mandatory fields are filled out.

1 Answer 1

2

There is no OOTB function which is handle your situation.

But you can have presaveaction function in sharepoint 2013, so you can check your condition using JavaScript in page and return false to this function if your condition not satisfied. So it will not save your item without mandatory fields.

1
  • Thanks, that worked like this. I also came across a workaround that you can just write somethings in the fields when they were hidden and clear this when the user again would activate them. This should be possible also in other SP versions and for people that have no possibility to do the JS variant.
    – D. Stetter
    Jan 30, 2017 at 14:56

Your Answer

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

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