Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Show/hide group of controls

I have a number of text boxes on a form that are only applicable if the user checks a checkbox.
Can I toggle the visibility of these controls based on the state of the checkbox?
If so, is it best to group them in a container or other?

Hi Jay, we have "Column Permissions" under the Advanced section on the left-hand pane of the Forms Designer. This allows you to group permissions (show, hide, read-only) based on conditions, such as if a checkbox is checked or not, or a selection in a drop list, for multiple columns at once. See this section of the manual. Let us know if this does not answer your question. https://www.crowcanyon.info/nitro/appmanual_v2/column-permissions.html

HI Scott, just came back to delete my question as I found a way to do it and then saw your reply.
Thanks for this.

What I want to do is show/hide a group of controls rather than an entire tab or section and I've achieved it like this...
I added a table via "form controls" in Nitro Studio and dragged 2 text boxes within.
The resulting HTML was
<table id="YTUwZWFiNWItYTQ1MC00MWMwLWI1NzktNTAwYTZjZjYzNjky" class="CCSFormTableLayout"></table>
Which I have trimmed to make it easier to read.
I then hid the table by default on form load and added a script to the "on column value change event" of a checkbox and used this...

var text = document.getElementById("YTUwZWFiNWItYTQ1MC00MWMwLWI1NzktNTAwYTZjZjYzNjky");
text.style.display = "block";

That is an interesting solution. It is good to have a way to show or hide a table. We can show or hide tabs, sections, columns, groups of columns, but having a way to hide a table on a tab or section can be helpful also. I will share this with the team.

I was looking for a (Nitro) way to create a group of columns but could only find table (I know about tabs and sections)... is there another way to group controls?

You can add sections and containers within existing tabs and sections and add columns to that new "inner" section or container. Then you can set permissions on the inner section or container that are specific to it. The inner section's header can be hidden and also the arrangement of the columns can be different (such as 2 columns instead of one) than the main section it sits in. Have you tried that option as a way to group columns?

If I switch to a tabs layout then the section command from the form controls window disappears so I can't see how to add a section to a tab.
Also can't see any container command unless you mean tables?

Just tried using permissions to show/hide an inner section and it works perfectly thanks

 

Update: I found the container command under the cog for the section.