Forum Discussion
Vdraper
Sep 04, 2023Copper Contributor
How to make a form field appear when a toggle button is turned on
Hi, I am very new to form building and not very technical so please bear with me. I am trying to get a field to only be visible when the toggle button is turned on. How would I go about achievi...
ganeshsanap
Sep 04, 2023MVP
Vdraper You can also achieve this using SharePoint out of the box capabilities (without using Power Apps forms). Follow below steps:
- Create Yes/No (boolean) type column in list for showing toggle
- Format the display of yes/no column using JSON column formatting using JSON samples provided in my answer at: Adding a clickable button to A SharePoint list to update a Yes/No Field - this will turn display of your Yes/No column from default checkbox to toggle
- Then you can show/hide list form fields using SharePoint conditional formulas. For example, you can use formula like:
=if([$YesNoColumnInternalName]==true,'true','false')​
Where YesNoColumnInternalName is the internal name of your Yes/No column. You can get the internal name of your columns by following this article: How to find the Internal name of columns in SharePoint Online?
Follow this Microsoft official documentation for steps showing where to add the conditional formulas: Show or hide columns in a SharePoint list or library form
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.