Documentation

Advanced Form Building

This article goes deeper into the form field editor: data types, input types, validation, expressions and groups. The same editor is used for forms, custom fieldsets and your own content types, so everything here applies to all three. For the basics of creating a form, see Building Forms.

Data types

Every field has a Data Type, which decides what kind of value is stored:

Data TypeStoresExample use
Basic Text / StringText, on one line or severalNames, comments, notes
Number / DecimalNumbers with decimalsMeasurements, ratings
Integer / Whole NumberWhole numbersQuantities, ages, counts
BooleanYes or noOpt-ins, confirmations
DateA date, optionally with a timeDate of birth, preferred start date
Email AddressA validated email addressContact email
URLA web addressWebsite, portfolio link
Content ReferenceA link to another record in QikChoosing an event, a team or a profile
Database KeyA machine-friendly identifierCodes and keys
Generic Object LiteralStructured dataLocations, data from special widgets
No/Null valueNothing — display onlyHeadings and explanatory text

Fields can also be groups that contain other fields (see below).

Input types

The Input Type decides how the field looks and behaves for the person filling it in. The options depend on the data type. Common ones include:

  • Text Field, Text Area and Rich Text Editor
  • Select - Dropdown and Select - Buttons
  • Checkbox and Switch
  • Date Picker, Time Picker and Timezone Selector
  • Currency and Range Slider
  • Content Reference Search and Value Search
  • File Upload, Signature Field, Location Select, Country Selector and Color
  • Sensitive Text / Password and Hidden Value
  • HTML Code — display formatted text or instructions inside the form

Field settings

How many answers

  • Minimum Answers — 1 makes the field required; 0 makes it optional.
  • Maximum Answers — 1 allows a single answer; 0 allows unlimited answers, turning the field into a list people can add to.

Options

For dropdowns and buttons, add Options. Each option has a title (what people see) and a value (what is stored). Options can also be loaded from a smart list or a URL.

Validation

Depending on the data type you can set:

  • Minimum Numeric Value and Maximum Numeric Value for numbers.
  • Minimum Character Length and Maximum Character Length for text.
  • Earliest Date and Latest Date for dates.
  • Allowed Answers to restrict which values are accepted.

Validation runs both in the form and on the server, so a submission that breaks the rules is rejected.

Display

  • Prefix and Suffix — text shown before or after the input, such as "$" or "kg".
  • Hide visually from user — keeps the field working (including validation and expressions) but doesn't show it. Useful for values calculated by an expression.

Expressions

Expressions let a field react to other answers. They are written as short JavaScript expressions on the field's Expressions tab and can read the form's answers through model, using each field's database key.

ExpressionWhat it doesExample
ShowOnly show the field when the expression is truemodel.hasDietaryNeeds
HideHide the field when the expression is truemodel.attendanceType == 'online'
Default ValuePre-fill the field from other answersmodel.email
ValueAlways set the field to a calculated valuemodel.quantity * 25
Reference TypeFor reference fields, choose which kind of record can be selectedmodel.lookupType

More examples:

  • model.country == 'AU' — only show a field when Australia is selected.
  • model.firstName + ' ' + model.lastName — combine two answers.

Groups

A group holds several fields together. Group settings include:

  • As Object — store the group's answers together under the group's key. Without it, the fields are saved as if they weren't grouped, and the group just organises the layout.
  • Maximum Answers set to 0 — make the group repeatable, so people can add several entries (for example several emergency contacts). Use Plural to name the entries.
  • Same Line — show the group's fields side by side.
  • Show Label and Show Description — show the group's title and description above it.
  • Collapsible — let people expand and collapse the group.
  • Reorderable and Duplicatable — for repeatable groups, let people drag entries into order or copy an entry.
  • Edit in Modal — edit each entry in a pop-up window.

Field templates

When adding a field you can start from a template, such as Person / Profile (names, email and phone), Address (street, suburb, state, postcode and country), File Upload or Date Picker. Templates add a ready-configured field or group that you can then adjust.

Tips

  • Don't change a field's Database Key once people have started submitting — existing answers stay under the old key.
  • Use the preview and Show Data Model to check exactly what will be saved.
  • Test your conditional logic by filling in the form yourself with different answers before sharing it.

FAQs

What's the difference between Show and Hide expressions?
Can I reference other fields in expressions?
How do I make a repeatable field?