Stacking Groups provides a way to create a relationship between fields so that one field will slide up, slide down, or disappear if another field is left blank. You could use this to show an icon image of a phone next to a phone field only when the phone number is entered by the user. If no phone number is entered, the image is hidden and the other fields slide into place leaving no gaps in your template. This was a very popular option prior to implementing field scripting but currently field scripting is a more powerful option.
Note: Stacking Groups are only for forms-based templates. Stacking Groups can work with fields that use field scripting if the result of the script on the field will be completely empty.
Example of Stacking Groups
In Example 1, all three contact information items are part of the same stacking group. Each line has a corresponding icon that will only show if that line has been filled out. In Example 2, notice that the Fax field is empty so the Email line and icon slid up and take the position of the Fax field and icon.
Example 1: All three contact information fields have been filled out and display their corresponding icons.
Example 2: In this example, the Fax field is empty and the Email field and corresponding icon slide up to fill that space. The Fax icon is also not shown.
Setting up the Stacking Groups Tab
(Templates > Field Setup > [Select Field] > Stacking Groups tab)
This field is for both the creation of a new group as well changing the behavior of an existing group. The drop-down shows Add New, which is used for creating the new groups, and any existing stacking groups for that template. Selecting an existing group will allow you to change the name or the group action. Do this by selecting the group, making your changes and clicking “Update Stacking Group.”
When creating a new stacking group, enter the name here, choose “Add New” under Select Group, select your Group Action and click “Update Stacking Group.”
The options are Slide Up or Slide Down. This will move fields below the stacking group field up or down.
Update Stacking Group
After making any changes or creating a stacking group, click this button. Note: After updating the stacking group the assigned group name will no longer appear in the "Select Group" field.
Important: After making changes in the Stacking Group tab be sure to click Save and Commit Changes.
Membership & Dependency
Member of Group
Groups must be created for each template; groups from Template A will not be available on Template B. Once the groups have been created (more on that below) simply select the group name from the drop-down. Any field you want to either move or hide must be part of the stacking group.
This drop-down is a list of the other fields present in the template. Select the field you want to be filled in in order to show this field. For example, if you have a phone icon you only want to appear if the user enters a phone number, you would make a Group called Phone and set the icon field to Depends on: Phone.
Note: Because stacking groups depend on another field either having or not having content, you never want to have a stacking group depend on a required field.