Hello,
You have add two buttons ( + , -) in header part of the template.
Follow the below steps to show / hide the section.
1. Respective fields or controls you have move into one section.
2. On ‘+’ button you have to set condition is ‘expand is equal to true’ hide and same as opposite for ‘–‘ button have the condition is ‘expand is not equal to true’ hide the control. (Expand is secondary variable to show / hide the button).
3. On ‘+’ button you have to set the rule to set ‘expand’ to true and same as for ‘-‘ button have the rule is set ‘expand’ to false.
4. You have to add one condition for section is: ‘expand is not equal to true’ hide the section.
Note: Expand field default value is false.