Skip to content

Input Types

This page describes every input type you can use in a 3D form.

Note

Input, question and field usually mean the same thing. The word depends on where you are.

  • A question is what the user sees on the form.
  • An input is what you configure when you build the form.
  • A field is a column in the data table.

Before you build a form, take time to choose the best type for each question. The less freely a user can answer, the more consistent your data is, and the easier your analysis.

Take the question "How tall are you?". With a Text type, all of these are valid answers for the same height:

  • 180cm
  • 5 ft 11 in
  • five feet, eleven inches
  • a little under 6ft
  • 5'11"

To count the people of this height, you would have to read every answer.

Change the type to Integer, show the unit in the label, and add a minimum and a maximum. The answers become numbers you can count and compare. "How tall are you (cm)?"

In the same way, a list of options gives better data than free text. Spelling cannot vary.

Every type has its own page, with the settings, the data, and how the question looks on the web and in the 3D app side by side. Some types behave differently on the two. Each page says which.

Text

A short answer on one line. Sub-types add a rule for an email address, a web address, a phone number, letters only or digits only.

See the Text page for the settings, the data and how it looks on the web and in the 3D app.

Long Text

An answer of several lines, for a comment or a description.

See the Long Text page for the settings, the data and how it looks on the web and in the 3D app.

ID

A short, readable identifier that 3D gives to each record, with an optional prefix. The user never sees the question.

See the ID page for the settings, the data and how it looks on the web and in the 3D app.

Integer

A whole number, with an optional minimum, maximum, prefix and suffix.

See the Integer page for the settings, the data and how it looks on the web and in the 3D app.

Decimal

A number with a decimal part.

See the Decimal page for the settings, the data and how it looks on the web and in the 3D app.

Percent

A share of a whole. The user types a fraction, such as 0.75 for 75%.

See the Percent page for the settings, the data and how it looks on the web and in the 3D app.

Range

A number the user picks on a slider, between a minimum and a maximum.

See the Range page for the settings, the data and how it looks on the web and in the 3D app.

Select One

A list of options that you write into the question. The user picks one. Each option has a label the user sees and a value that 3D stores.

See the Select One page for the settings, the data and how it looks on the web and in the 3D app.

Multi-Select

A list of options that you write into the question. The user picks one or more.

See the Multi-Select page for the settings, the data and how it looks on the web and in the 3D app.

Toggle

A switch that is on or off, with a log of every change.

See the Toggle page for the settings, the data and how it looks on the web and in the 3D app.

Date

A calendar date with no time, with an optional rule for past or future dates only.

See the Date page for the settings, the data and how it looks on the web and in the 3D app.

Time

A time of day with no date.

See the Time page for the settings, the data and how it looks on the web and in the 3D app.

DateTime

A date and a time together.

See the DateTime page for the settings, the data and how it looks on the web and in the 3D app.

Image

A photo, taken with the camera in the 3D app or uploaded on the web.

See the Image page for the settings, the data and how it looks on the web and in the 3D app.

File

A document attached to the submission.

See the File page for the settings, the data and how it looks on the web and in the 3D app.

Relation

A link to a record in another table. The user picks the record from a searchable list. This is what connects your data across tables.

See the Relation page for the settings, default filters, QR scan, the data and how it looks on the web and in the 3D app.

Cascading Select

One question with several levels, such as Country, Region and Town. Each pick narrows the next. It is built on a View that joins the tables of the levels.

See the Cascading Select page for the tables and View it needs, the settings, the data and how it looks on the web and in the 3D app.

Matrix Field

A table inside the form. Each row becomes a record in a linked table.

See the Matrix Field page for the settings, the data and how it looks on the web and in the 3D app.

Nested Form

A set of questions the user can repeat, or a picker for several existing records.

See the Nested Form page for the settings, the data and how it looks on the web and in the 3D app.

Auto Calculated

A read-only value that 3D works out from other fields of the record, with a formula. In the Type list, choose Auto Calculated v2.

See the Auto Calculated page for the settings, the data and how it looks on the web and in the 3D app.

Geolocation

A point on the earth, as a latitude and a longitude.

See the Geolocation page for the settings, the data and how it looks on the web and in the 3D app.

GEO Area

An area drawn on a map as a polygon. Web only.

See the GEO Area page for the settings, the data and how it looks on the web and in the 3D app.

Barcode

The value of a barcode or a QR code, scanned in the 3D app or typed on the web.

See the Barcode page for the settings, the data and how it looks on the web and in the 3D app.

Separator and Media

A Separator is a heading and a paragraph that mark a section. Media is a logo or a content image. Neither one is a question, and neither one creates a column. See Separators and Media on the Forms page.

Validation

Validation rules decide which answers a question accepts. Set them in the question's settings under Validation. An answer that fails a rule shows a message under the question, and the form does not submit until the user corrects it.

The rules depend on the type.

Type Rules
Text, Long Text Min and Max length, in characters. For Phone number, in digits.
Integer, Decimal, Percent, Range Min and Max value.
Date, DateTime Only future date, Only past date or None.
Multi-Select, Nested Form Minimum and maximum number of picks or rows. See the type's own section.

A limit that is another question

For a number question, Min and Max can name an earlier number question instead of a fixed value. Click in the box and choose the question from the list. Type a number to use a fixed value instead.

For example, a form asks "How many children live here?" and then "How many of them attend school?". Set the Max of the second question to the first question. The form then refuses an answer that is larger than the first answer.

The message names the other question, for example "The number must be Children in household or less".

The limit only applies when the other question has an answer. While it is blank, the web form shows "Please set 'Children in household' first" as a reminder, and the app shows a warning. Neither one stops the user.

Tip

To make the limit always apply, set the other question to Required. The form then cannot submit without the answer that the limit needs.

Advanced validation

For a rule that a Min or a Max cannot express, choose Advanced expression. This opens the same editor as an Auto Calculated field. Write a formula that gives true when the answer is valid.

The rule refers to its own question and to other questions by their names. Some examples:

Rule Formula
The end date is not before the start date end_date >= start_date
A quantity is a multiple of 10 quantity % 10 == 0
A phone number is required when the answer to has_phone is Yes has_phone == 'yes' ? !isblank(phone) : true

A blank answer passes an advanced rule. Use Required to insist on an answer. A rule that reads a blank question also passes, and the app shows a warning instead of an error. To make the rule always apply, set the questions it reads to Required. To make a blank other answer fail inside the rule, test for it: !isblank(q1) && q2 <= q1.

Note

This is a deliberate difference from the XLSForm standard, where a constraint that reads a blank fails. In 3D, a rule can only fail on answers that exist.

Add a message to show when the rule fails. The user sees your message under the question. If the form has extra languages, you can translate the message. Without a message, 3D shows a generic one.

The rule runs when the user changes the answer, when a question the rule reads changes, and when the user submits.