Documentation

Component Settings

Explore Govform.com guidance, configuration details and practical steps for component settings.

Data Grid special-row settings

Special rows add calculated or explanatory cells to a data-grid group. They are commonly used for totals or summaries and should remain clearly distinct from editable data rows.

Add a special row deliberately

Set its position, target column and Liquid value. Use the first or last position for a clear summary, or a numbered position only where the placement has a genuine meaning.

flowchart LR
  A[Editable grid rows] --> B[Calculated special row]
  B --> C[Total or summary visible to the person]

For totals, calculate from the complete repeated-field array rather than joining displayed values. Test empty rows, zero, decimal values, added rows, removed rows and edits.

Use visual emphasis sparingly

Dividers, bold and italic text can distinguish a total, but the label and value must be clear without styling. Do not use special rows for instructions that a person needs before entering their data; place those above the grid instead.

Position the row predictably

Use the first position only for information a person needs before working through the grid, and use the last position for totals or conclusions that depend on all rows. A numbered position can be appropriate for a category subtotal, but only when its placement remains meaningful as rows are added or removed.

Name the special row’s target clearly in its content. “Total amount” is more useful than a bare number, particularly when the grid is read by a screen reader or exported to another format.

Keep calculations robust

Use a Liquid expression that works when there are no rows, one row and many rows. Decide how to display blank values, zero and invalid data before building the formula. Do not calculate a business-critical total from text that has merely been formatted for display.

If a total affects eligibility, payment or a later action, test the calculation independently and make the downstream rule explicit. A visually correct total is not enough if the service uses a different value for its decision.

Test checklist

  • The row position makes sense when rows are added, removed or reordered.
  • The label explains the number or summary without styling alone.
  • Empty, zero, decimal and long-value cases are handled deliberately.
  • The expression uses the underlying data rather than display text.
  • Any downstream condition or action uses the same intended calculation.

Related guidance

Keep exploring

Explore more documentation

View all categories →