Sections
Sections could be used to show or hide part of document. It could be paragraph / table row / list item or whole document page. Sections differ from fields that has starting and ending point. Section n
Simple Section
Section w/o fields is detected when there is no additonal fields provided within section. Simple sections are visible in form as checkbox fields.
Simple section (no fields defined)
Simple section (only field is inherited from upper level)
Inverted Section
If you want to show block of document when section is undefined (unchecked/list not provided) feel free to use “^” special section tag.
Sections with Fields
Sections could consist of additional fields that are valid per each section.
One-block / Repeated block
Sections could work to show/hide part of document conditionally once or repeat part of document multiple times based on form input.
Upper Level Fields
If you use exact same field names as in upper context value will be inherited from upper level and omitted as part of the section.
Conditional part of document with additional fields
You can create sections with fields to show/hide part of the document. If we detect additional fields within section user will be asked for filling in additional fields.
Fields “parentName” and “parentPhone” will appear on form only if section field will be selected.
Table Rows using Sections (Repeated Block)
You can use sections with fields to define rows in table. As a template you just need to use one table row.
In first column include section start tag, in last columns use section close tag
{#products} {name}
{category}
{price} {/products}
You can create sections / table summaries combining sections and smart fields and filters (You should use them outside of the section/columns definition)
Example:
Example with sum filter:
Please remember to wrap your expression after sum: into quotes!
Example usage in table:
{#products} {name}
{category}
{price} {/products}
No of Products: {$products.length}
Total: {$ products | sum:'price'}
In the example above there is an extra footer row added to the table (outside of the section) indicating how many products are in the table and another one that sums up a field 'price' from all the rows
{#products} {name}
{category}
{price} {/products}
Subtotal: {$ subtotal = products | sum:'price'}
Total (with 23% VAT): {$ subtotal * 1.23 | format}
In the example above there is an extra footer row added to the table (outside of the section) that sums up a field 'price' from all the rows displays it and saves it as a "subtotal" template variable, then the variable is used to calculate Total value in Smart Section and formatted accorindgly.
Loop items (Repeated Block)
You can create any blocks, paragraphs, cards, or mini table and use it as template. Whole template block will be repeated amount of times it’s repeated in input form.
See example below.
Special field for ordinal number - $iterator (Repeated Block)
You can use special smart tag “{$iterator}”. It could be used within section template.
For each section it will generate consecutive numbers: 1,2,3,4 without need to enter them manually as a field.
{#products} {$iterator}
{name}
{category}
{price} {/products}
Last updated