This guide shows how to use every target type in Form UI by styling a Sales Invoice step by step. After following these steps the invoice will be denser, better organised, and easier to fill in without scrolling.
- Open Form UI Settings and confirm both toggles are on:
- Compact Forms — tightens spacing globally
- Freeze Form Header — keeps the title and Save button visible while scrolling
- Open Form UI from the Awesomebar.
Goal: reduce the gap between fields and make inputs a little shorter so more of them fit on screen.
- Click ╋ New.
- Target Element →
Field - DocType →
Sales Invoice - Field(s) → select
All in this DocType(applies to every field) - Spacing & Layout:
- Field Gap →
4px - Field Padding →
2px 8px
- Field Gap →
- Dimensions → enable resize, set Height →
26px - Name the rule
SI – Field Densityand Save.
Result: all input fields on the invoice become shorter and sit closer together.
Goal: make the customer/date/currency fields sit side-by-side instead of stacking.
- Click ╋ New.
- Target Element →
Section - DocType →
Sales Invoice - Field(s) → pick the first section break (usually named something like
customer_section— check via Customize Form) - Spacing & Layout:
- Section Columns →
3 - Section Padding →
6px 12px
- Section Columns →
- Name the rule
SI – Header 3 Columnsand Save.
Result: Customer, Posting Date, Currency, and their neighbours spread across three columns instead of two, cutting the header height significantly.
Goal: hide the Debit To / Cost Centre fields until they are needed.
- Click ╋ New.
- Target Element →
Section - DocType →
Sales Invoice - Field(s) → pick
accounting_details_section(or whichever section contains Debit To) - Spacing & Layout → check Collapse by default
- Name the rule
SI – Collapse Accountingand Save.
Result: the Accounting section is collapsed when the invoice opens. Click the section heading to expand it when needed.
Goal: keep the Grand Total visible at the bottom of the screen while filling in line items.
- Click ╋ New.
- Target Element →
Section - DocType →
Sales Invoice - Field(s) → pick
totals_section(the section containing Net Total, Grand Total, etc.) - Spacing & Layout → check Sticky summary panel
- Section Background →
#f8f9fa(light grey so it stands out) - Name the rule
SI – Sticky Totalsand Save.
Result: the totals row stays pinned to the bottom of the screen no matter how far you scroll through the Items table.
Goal: give the Customer and Billing Address column more room so names don't truncate.
- Click ╋ New.
- Target Element →
Column - DocType →
Sales Invoice - Field(s) → pick the column break immediately after the Customer field
- Dimensions → Width →
45% - Name the rule
SI – Widen Customer Columnand Save.
Result: the left column (Customer, Address, Contact) takes up 45 % of the section width.
Goal: show more line items without scrolling, hide rarely used columns.
- Click ╋ New.
- Target Element →
Grid - DocType →
Sales Invoice - Field(s) →
items(the Items child table) - Spacing & Layout:
- Grid Row Height →
28px - Visible Rows →
8(table scrolls after 8 rows) - Hidden Grid Columns →
discount_and_margin, weight_per_unit, weight_uom(any columns your team never fills) - Check Sticky grid header
- Grid Row Height →
- Name the rule
SI – Items Gridand Save.
Result: the Items table shows 8 compact rows before scrolling, the rarely used columns are gone, and the header stays visible while scrolling through long item lists.
After saving each rule, click ⟳ (Reload Rules) in the toolbar and reopen a Sales Invoice. All six rules are applied in order of priority (lower number = higher priority; default is 10).
To adjust priority so one rule overrides another, edit the rule and change the Priority value.
| Rule name | Target | Effect |
|---|---|---|
| SI – Field Density | Field | 26 px inputs, 4 px gap |
| SI – Header 3 Columns | Section | Header in 3 columns |
| SI – Collapse Accounting | Section | Accounting section starts collapsed |
| SI – Sticky Totals | Section | Grand Total pinned to bottom |
| SI – Widen Customer Column | Column | Customer column at 45 % width |
| SI – Items Grid | Grid | Compact rows, hidden columns, sticky header |