Here’s the scenario:
In Sharepoint 2013 (on-prem) I have a custom list. The list has a Yes/No column called Ineligible. What we want to do is make Qual__Ineligible a required field (user has to choose one of the available values) if the Ineligible column is YES. If the Ineligible column is NO, then the Qual_Ineligible should be blank (if they aren’t ineligible, then we don’t need to know what qualification makes them ineligible.
I know how to do it in InfoPath forms, can I just modify the custom list in InfoPath?
I don’t know how to do it with jQuery or spservices, but would like to learn. if someone can point me to the appropriate resources/information, I’d appreciate it.
Maybe this could help? > http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=228
You could certainly do that with InfoPath.
SPServices has a built-in function to do cascading drop-downs (where a selection in one filters the available selections in another.) I don’t know if it will do what you are asking, though, without a bit more custom code.
Cascading Drop-downs (SPServices)
I would recommend jQuery for this. What you’re asking for is really form validation. There are lots of jQuery plugins for handling form validation. The one I use in my projects can be found here:
It lets you do things like ensure that the input in a textbox is in the format of a valid phone number or maybe a zip code. It also has the ability to allow you to write your own functions. You could use that to have a rule that when the Yes/No field is set to Yes, it requires the other field to have a value. You could do this with jQuery alone, but I recommend using something like this when custom forms are involved. It saves the developer a lot of time chasing errors from users who enter data that wasn’t expected. By writing the validation this way, you are forcing the user to conform to your rules instead.