This article covers advanced form building techniques including field types, conditional logic, expressions, validation, and layout options. For basic form creation, see Building Forms.
Qik supports a wide range of field types for collecting different kinds of data:
| Type | Description | Example Use |
|---|---|---|
| String | Single-line or multi-line text | Names, descriptions, notes |
| Integer | Whole numbers | Quantities, ages, counts |
| Float | Decimal numbers | Prices, measurements |
| Boolean | True/false checkbox | Opt-ins, confirmations |
| Date | Date picker | Birthdates, event dates |
| Email address with validation | Contact emails | |
| URL | Web address | Websites, social profiles |
| Reference | Link to another content item | Selecting a profile, event, or other record |
| Key | Machine-readable identifier | Database keys, slugs |
| Object | Structured data object | Complex nested data |
Widgets control how a field is displayed to the user. Common widgets include:
Control how many values a field accepts:
Define the choices available in a dropdown by providing an array of options, each with a title (display text) and value (stored value).
Expressions are powerful formulas that let fields react dynamically to other field values. They are written as JavaScript expressions and have access to the current form data via the model variable.
model.hasAddress only shows the address field when a checkbox is ticked.model.type === 'business' makes ABN required only for business types.model.title copies the title field as a default.model.title + 'Form' generates a key from the title.model.country === 'AU' — Only show this field when the selected country is Australiamodel.quantity * model.price — Calculate a total from other fieldsmodel.firstName + ' ' + model.lastName — Combine fields into a full nameGroup fields let you nest multiple fields inside a container. This is useful for:
collapsible: true to let users expand/collapse groupssameLine: true to display group fields side by sideQik includes pre-built field templates for common data patterns:
Templates speed up form creation by providing pre-configured field groups you can add in one click.
visualHide: true on fields you want to compute automatically but not show to the userasObject: true to store nested data cleanly