0

Is the title weird-sounding? It is to me. But, here's my situation:

I would like to disable (in some way, greying out, or whatever) certain fields in a list based upon a CHOICE field I've got at the start of the list. For example, if choice "A" is chosen, fields 1 and 2 are disabled, but field 3 is still enabled. (I believe that JS is the best approach to making this happen) However, here's the rub that makes this one different: This choice field has check boxes, and will allow for multiple choices to be checked at the same time. So, using the above example, if choices "A" and "B" are chosen, field 2 is disabled, but fields 1 and 3 are enabled. With this wrench in the works, any ideas on how to make this work? I'm completely stumped.

1 Answer 1

0

I think still you can do using javascript by getting the selected choice value from Choice field and enable or disable other fields based on condition.

if its Modern site sharepoint online then you can use Field Customizer to add additional Javascript functionlity. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer

if its Classic site and above 2013 version then you can either go with Adding Content editor (not recommneded) or using JSlink concept to implement the same functionality.

https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a

1
  • I'm using 2013/Classic Sites. My question, however, lies in the area of the JS code itself. I can figure out how to make it work if the CHOICE field were a drop down list, but can't figure out how to make it work using the checkboxes with potentially multiple selections.
    – DanJ
    Commented Aug 23, 2018 at 18:43

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.