Extending Forms
This is the page that solves most requests. Adding a field to a GarmentFlow form, hiding one you never use, renaming one to your factory's vocabulary, changing which columns the list shows — all of it is done through one screen, and none of it is programming.
Your changes are stored separately from GarmentFlow's own definitions, so updates leave them alone.
Customize Form
Customize Form is where all of this happens.
Two ways in:
- Open any record and choose Menu (⋯) → Customize.
- Or Awesome Bar (Cmd/Ctrl + K) →
customize form→ pick the DocType.
The screen looks like the DocType editor but behaves differently: it does not change GarmentFlow's definition, it records your differences from it.
You need the System Manager role. Changes here affect every user on the site immediately.
Adding a field
The most common request. Say the quality team needs a Customer PO Number on the Production Order.
- Open Customize Form and set Enter Form Type to
Production Order. - Scroll to the Fields table.
- Find the row you want your field to appear after, and click Insert Below (the row menu), or click Add Row at the end and drag it into position.
- Fill in:
- Label —
Customer PO Number- Type —Data. See Field types for what each type is for, what goes in Options, and an example of each. - Name — leave it to generate, then prefix it: see naming. - Click Update.
Open a Production Order. The field is there, in the position you chose, and it already works everywhere — list view, search, reports, the API, print formats.
Name your fields defensively
Frappe generates a fieldname from the label: Customer PO Number → customer_po_number.
Change it to custom_customer_po_number — or use your company's prefix.
The reason: if GarmentFlow later ships a field called customer_po_number, the two collide, and resolving that collision is unpleasant. A prefix makes it impossible. Frappe's own convention is a custom_ prefix, and newer versions apply it automatically; set it yourself and you don't have to check.
Picking the type
The Type is the one decision on this screen that is hard to reverse — a Float changed to an Int loses its decimals, and there is no undo. Field types is the full reference: every type GarmentFlow uses, what it stores, what its Options field means, a real example, and a table of which type changes are safe.
If you are unsure between two, the general rules are: Data for anything short, Small Text for a paragraph, Link rather than Select when users should be able to extend the list themselves, and Table rather than JSON for anything you will ever want to report on.
The settings that matter
Open your field's row for the rest:
| Setting | What it does |
|---|---|
| Mandatory | Blocks saving when empty |
| Read Only | Visible but not editable |
| Default | Pre-filled value. Today on a Date field |
| Unique | No two records may share it |
| Allow on Submit | Editable after the document is submitted |
| In List View | Becomes a column in the list |
| In Standard Filter | Becomes a filter box at the top of the list |
| In Global Search | Findable from the Awesome Bar |
| Depends On | Show only when a condition is true |
| Fetch From | Copy a value from a linked record |
| Description | Grey help text under the field |
Two deserve their own explanation.
Allow on Submit
Many GarmentFlow documents are submittable — Tech Pack, Production Order, Production Batch. Once submitted, fields lock.
If your field must be editable after submit (a shipping reference added later, for instance) you must tick Allow on Submit. Miss it and users hit "Not allowed to change after submission" and will assume the field is broken.
Fetch From
Pulls a value from a record already linked on the form, with no script.
On Production Order there is a tech_pack Link field. To show the style's model name:
- Add a field, type
Data, labelStyle Name. - Set Fetch From to
tech_pack.model_name. - Tick Read Only.
The format is always link_fieldname.target_fieldname. Frappe keeps it in sync.
Use this rather than a script whenever the value lives one link away. It is the single most under-used feature in Frappe.
Depends On
Shows a field conditionally. The syntax is eval: followed by a JavaScript expression, where doc is the current record:
eval:doc.status=="On Hold"
eval:doc.qty > 100
eval:doc.customer && doc.delivery_date
eval:in_list(["Draft","Planned"], doc.status)
So a Hold Reason field that only appears on held orders gets eval:doc.status=="On Hold".
Depends On hides the field in the browser. It does not stop the value being set through the API. For a real rule, use a server script.
Hiding a field
Rather than deleting anything, hide what you don't use. Three options, from softest to hardest:
- Hidden — ticked on the field row. Gone from the form for everyone.
- Depends On — hidden except when relevant.
- Permission Level — hidden from everyone except roles you grant. See below.
For a GarmentFlow field you never use, tick Hidden. The data stays and nothing breaks; it just stops taking up screen space.
Don't hide a mandatory field. Users get a save error pointing at a field they cannot see. Clear Mandatory first — but check why it was mandatory before you do.
Changing labels
Change the Label on any field. The data is untouched; only the caption changes.
This is how you make GarmentFlow speak your factory's language — if everyone says marker and the form says tizada, change it.
Two notes: label changes apply to all users in the site's language, and if you run multi-language, edit the Translation records instead so each language gets its own wording.
List view columns
The list is separate from the form, and configured in two places.
Quickly, from the list: open the list view, and use the column headers to add or remove columns and change widths. Frappe saves this per DocType.
Permanently, from Customize Form: tick In List View on the fields you want. This sets the default for everyone, including new users.
Alongside it:
- In Standard Filter puts a filter box at the top of the list.
- The Sort Field and Sort Order settings, near the top of Customize Form, decide the default ordering.
- Title Field decides what shows as each record's heading — set it to something human (
model_name) rather than a code. - Search Fields — a comma-separated list of fieldnames searched from the list's search box.
- Show Preview Popup shows a card on hover in linked fields.
For a list your planners look at forty times a day, spending ten minutes on these settings is the highest-value customization in this entire section.
Report view columns
The Report view (the table icon in a list) is a spreadsheet-like grid. Users pick their own columns there with the column menu, and can save the arrangement as a Report Builder report — see Creating reports.
You don't need to configure anything for this; it is worth telling your users it exists.
Restricting fields by role
To let only accounts see a cost field:
- On the field row, set Perm Level to
1(any number above 0). - Go to the DocType's Permissions — via Customize Form, or the Role Permission Manager.
- Add a permission row for the role that should see it, with Level =
1and Read (and Write, if they may edit).
Everyone without a level-1 permission stops seeing every level-1 field.
Level 0 is the default and covers all normal fields. Group fields you want restricted onto the same level.
Other things Customize Form controls
Near the top of the screen:
- Max Attachments, Allow Auto Repeat, Allow Import (enables the Data Import tool for that DocType), Track Changes (the version history), Editable Grid, Quick Entry.
- Naming — for DocTypes that permit it, you can change the naming series here without touching the DocType.
- Form Settings → Image Field — which Attach Image field renders as the record's picture.
Further down:
- Links / Connections — which related documents appear in the Connections tab. This is how you surface your own DocType on a GarmentFlow form.
- Actions — buttons that run a defined action.
- States — colour-coded indicators driven by a field's value.
Seeing and undoing your changes
Every change here writes a record you can inspect:
- New fields become Custom Field records. Awesome Bar →
custom fieldlists them all. - Changed properties become Property Setter records. Awesome Bar →
property setter.
To undo one change, delete its Property Setter. To undo everything on a DocType, use Menu → Reset to defaults in Customize Form — which removes the property setters but not your custom fields, so deleting a field is a separate, deliberate step.
To copy your customizations to another site, use Menu → Export Customizations: it produces a file containing the custom fields and property setters for that DocType, importable elsewhere.
What survives an update
| Change | Survives? |
|---|---|
| Custom fields | Yes |
| Property setters (labels, hidden, mandatory, defaults) | Yes |
| List view settings | Yes |
| Editing GarmentFlow's files directly | No |
If GarmentFlow ships a change to the same property you overrode, yours wins — which is usually what you want, and occasionally means you miss an improvement. If a form stops behaving as the documentation describes, check the Property Setter list first.
What to do next
If the form now holds the right data but needs to behave differently — react as it is filled in, warn, calculate — continue to Client scripts.