1

I have a SP online list that contain required fields. One option asks if an event was cancelled-it is a yes/no option. I want to be able to disable the remaining options in the form if the selection is 'yes' to the 'Event Cancelled' question and then save the new item.

Is this possible? If so, where do I put the code for this?

So if event cancelled, then disable the remaining options in the form.

Update:

I made a Yes/No option for Canceled. I have the following code that I am adding to the field that I want to hide; however, it is not working:

=if([$Canceled] == true, 'false', 'true')
2
  • Are you using SharePoint online or SharePoint On-Premises? The fields you want to hide are all required/mandatory fields? Jul 19, 2023 at 4:25
  • Hi @Flp, does my below answer help you in any way? Let me know if you need any further help on this question. Aug 18, 2023 at 14:13

1 Answer 1

0

First of all, you will have to make all dependent fields non-required, as you cannot add conditional formulas for required SharePoint list columns.

Your formula syntax looks correct to me. You can also try the conditional formula like below:

=if([$Canceled], 'false', 'true')

Also, make sure you are using the correct internal name of your Yes/No (Canceled) column in the conditional formula. You can get the exact internal name of your column by following this article: How to find the Internal name of columns in SharePoint Online?


You have to add the conditional formula from list forms > Edit columns > Edit conditional formula section.

You can follow the detailed steps given in Microsoft official documentation at: Specify conditional formula to show or hide SharePoint list columns

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.