Forms
Verified against source (9)
decision/ImportFormTemplate.csdecision/ImportFormTemplate.Fields.csdecision/ImportFormQuestion.Fields.csConfig/ImportForm.configConfig/ImportFormQuestion.configdecision/ImportForm.csapplication/AbstractObject.csConfiguration/GUI.Edit.xsltResources/CreateTriggerImportFormTransition.txt
Each kind of form is a form template (a task template in QBO menus). Besides the settings every template shares (see Templates), a form template has:
| Setting | Purpose |
|---|---|
| Applies To | The kind of record the form attaches to, such as a process or a contact. |
| Label | The default name for new forms. If it’s empty, the template name is used. |
| Method | Optional data source for rendering, used in place of the parent record’s summary. |
| Worklist | A worklist template. Every new form becomes a work item (see Worklists). |
From the template’s summary page you can Copy it, Choose Layout, Create a Worklist, Create Schema (an XML schema of its questions, for imports), Clear Cache, and open the GUI Designer. The Workflow Steps panel shows which workflow steps create this form.
Questions
Section titled “Questions”Each question is one field. Answers to questions are stored with the form, so you can add fields without changing the database.
| Property | Purpose |
|---|---|
| Name | The field name. Use letters and numbers only. Use an underscore only to reach a related record: {Parent}_{Field} saves to the record the form is on. |
| Label, Tooltip | What the user sees. |
| Form element | The input type (see Field types). |
| CSS class | Validation: required plus a format such as qbo-date. Separate classes with spaces. |
| Behaviors | Dropdown sources, dependencies, and date limits (see below). One per line. |
| Select options | A fixed list of choices, one per line. |
| Default value, Value XPath | Prefill the field. Value XPath reads from the parent record’s data, for example //OrganizationItem/Address. |
| Format class | Accepts |
|---|---|
qbo-date, qbo-date-nocal |
A date (with or without a calendar picker) |
qbo-int, qbo-numeric, qbo-money, qbo-percent |
Whole numbers, decimals, currency, percentages |
qbo-phone, qbo-phoneext, qbo-ssn, qbo-zip |
US phone (with or without extension), SSN, ZIP code |
Behaviors look like this:
Dropdown|{'type': 'ObjectStatus', 'data': {'Object': 'Process'}}Depend|{'depends': 'FieldA', 'condition': 'or', 'disabledClass': 'disabled'}Validator|{'maxDays': '0'}- Dropdown fills choices from QBO data: statuses, types, people, labels (teams), templates, matrices, schedules, and more.
- Depend enables a field only when another field has a value. A dependent
requiredfield is required only when it’s enabled. - Validator limits a date relative to today using
maxDaysandminDays. The example rejects dates after today.
Questions can be bulk loaded from a spreadsheet like any other QBO data, using one row per question.
The GUI designer
Section titled “The GUI designer”The designer has four tabs:
- Form: select the form, its action buttons, a row, or a field to edit it. Rows have one or two columns and can be marked Advanced so they stay hidden until the user expands them. Drag rows to reorder them. Click Save on each element before selecting the next one.
- JavaScript: custom script for the form. Field Watch on the form runs one of your functions when chosen fields change.
- XSLT: the generated views (edit, read-only, and others). You rarely need to change them.
- Preview: renders the form against a real parent record by ID.
Field types
Section titled “Field types”Input, Checkbox, Dropdown, Hidden, HTML, Radio Buttons, Read Only, Section Header, Text Area, Upload, and Upload Matrix. Fields can be marked Require, Justify (the user may give a reason instead of meeting the requirement), and Clean (strip invalid characters). A field’s Mapped Value can prefill it with an XPath expression over the record’s data.
Button layouts
Section titled “Button layouts”| Layout | Buttons |
|---|---|
| Default | Save and Cancel. Save is enabled once validation passes. |
| Full Page | Like Default, but Save returns to the parent record’s page. |
| Pause / Submit | Adds Pause, which saves without completing. |
| Status | One button per allowed status move, plus Pause. Only moves to a final status enforce validation. |
| Status Validate | Like Status, but every move enforces validation. |
| Task | Like Default, with the standard task save script. |
State diagram
Section titled “State diagram”The State Diagram panel lists the moves a form may make: from status, to status, whether it’s an initial or final state, the role or permission required, and an optional worklist template. When a template has a diagram, QBO enforces it on every save, including imports and the API. Each move completes the old work item and queues the form on the move’s worklist. See Worklists.
Validation beyond the screen
Section titled “Validation beyond the screen”Screen validation only helps people using the screen. For forms created by imports or the API:
- Validate checks saved forms against their questions (required fields with dependencies, dropdown and list values, and date limits) and records a message on each form that fails.
- Validation rules enforce conditions on every save, and the Rules matrix can make fields required or hidden without editing the form.
Start from a spreadsheet
Section titled “Start from a spreadsheet”Drag a spreadsheet onto the Worklists dashboard to create a form template with one question per column. Columns with a few repeating values become dropdowns, and data types are inferred. QBO also creates a form for each row and a worklist to work them.