app builder

Using question in your apps

Updated: October 14, 2021

Add questions to your apps to collect information from the end-user. This is the most common method for defining variables.

Basics

Create questions

You can only add questions to question pages. To create a new question, click the "Question" button and select the type of data you want to collect:


Basics

Conditionally ask questions

To conditionally ask a question, select it and then click the "show if" toggle; this allows you to create an expression (if that expression is True, the question will be displayed to the end-user): 

In the example above, we're conditionally asking the end-user what their partner's name is immediately after we ask whether or not they are married.

Question types

Short text

Creates a variable type that can store only strings (a sequence of characters). This can be used to store any information such as names, phone numbers, identification numbers, or any other text.

Pro-tip: Are you collecting standard information that has a pre-defined number of characters, such as a government-issued identification number? Set the minimum number of characters and maximum number of characters.

You can send data to a database column whose datatype of Plain Text or Rich Text.

Question types

Long text

Creates a variable type that can store only strings (a sequence of characters). This can be used to store any information such as descriptions, long format responses, or any other text.

You can send data to a database column whose datatype of Plain Text or Rich Text.

Question types

Yes/no

Also known as boolean, this creates a variable type that only has two possible values: true or false.

You can send data to a database column whose datatype is True/False.

Question types

Checkboxes

Stores a string (a sequence of characters) as its value. Each value is either true or false. Use this if you would like to allow the end-user to select more than one option.

You can send data to a database column whose data type is True/False.

Question types

Radio buttons

Provide a short, pre-defined list of answer choices to the end-user. All answer choices will be displayed at once for the end-user to see. Use this if your list is short and if you would like to allow the end-user to select only one option. Use this for multiple-choice questions where there is only one answer.

You can send data to a database column whose datatype of Plain Text, Rich Text, or True/False.

Question types

Provides a pre-defined list of answer choices to the end-user. All answer choices will be displayed at once for the end-user to see. Use this if you prefer a dropdown user interface or if your list is long and if you would like to allow the end-user to select only one option. If your list is very long, you may want to consider connecting a data source and using a Row Selector instead so you do not need to manually add each option.

You can send data to a database column whose datatype of Plain Text or Rich Text.

Question types

Number (decimals)

Also known as an integer, is a variable type that allows you to store numeric values. They can be used to perform mathematical calculations on the value such as equations (add, subtract, multiply, divide, etc.), numerical comparisons, etc.

You can send data to a database column whose data type is Number.

Question types

Number (whole number)

Also known as an integer, is a variable type that allows you to store numeric values. They can be used to perform mathematical calculations on the value such as equations (add, subtract, multiply, divide, etc.), numerical comparisons, etc.

You can send data to a database column whose data type is Number.

Question types

Money

Creates a number-type variable (see above). By default, money variables, when interpolated (meaning displayed on a document or page block), are formatted without commas and to a single decimal point. You can change how a number-type variable is formatted by selecting the variable and using the rich text editor side-bar to “Format As” or by using an expression block to format the variable and create a new variable. You can customize the currency display used in the app’s page blocks under App Settings > Styles > Customize currency.

You can send data to a database column whose data type is Number.

Question types

Date

Date values are number-type variables. By default, date variables are formatted based on your App Settings > Styles > Format dates. You can also change how a date variable is formatted by selecting the variable when it appears in your page block and using the rich text editor side-bar to “Format As” or by using an expression block to format the variable and create a new variable.

You can send data to a database column whose data type is Date.

Question types

Time

Time values are number-type variables that are displayed as hours, minutes, and seconds.

Question types

Row selector

A row selector question allows the end-user to select a row of data from one of your data sources (learn how to add a data source to your app).

After you add a row selector question, you'll be prompted to (a) select the data source you want to use; and (b) choose which column from that data source you want the end-user to search through:


Question types

Upload file / image

Allows your end-user to upload a single file.

You can send data to a database column whose data type is File.

Question types

Range

Is a number-type variable that allows the end-user to select a value from a range of numbers. For example, you can use this to collect feedback on a scale from 1 to 10.

You can send data to a database column whose data type is Number.

Question types

Email

Allows you to require your end-user to enter in a response that includes traditional email formatting, e.g, hello@afterpattern.com.

You can send data to a database column whose datatype of Plain Text or Rich Text.

Question types

Password

Stores an encrypted string that are masked with an asterisk (*) symbol when the end-user is entering their response.

You can send data to a database column whose datatype of Plain Text or Rich Text.

Question types

Combobox

Allows your end-user to select or type a value from a dropdown list.

You can send data to a database column whose datatype of Plain Text or Rich Text.

Question types

List selector

A list selector question provides the end-user with a dropdown (not a search field) where they can pick an option from one of your list variables.

For example, if I have a list variable created by a loop section that collects the end-user's children, I can connect that list to a list selector question to give the end-user a dropdown of their children:

You send the data from a list selector question to a database column of plaintext or richtext.

On this page

Basics
Question types

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services