Select

Select

{{ select }}

Properties of {{ select }} objects
Name Type Description
is_valid Boolean True if one of the defined options is selected. To make a (none) option, define an option with an empty value
value String Delimited string containing the values from all of the selected options. For select fields you do not typically care about this - use selected or values instead
default_value String The default value for this field if no value is specified
options object Contains all of the available options for this select list. Each option is a property on the object where they property key is the option value and the property value is the option text
selected list A list containing the values from all of the selected options
values list A list containing the text from all of the selected options
count Integer The number of selected options
field_id String The identifier for this field
label String The label for this field
output String String containing the text from all of the selected options. May include additional markup in the editor preview to make it easier to edit content

Represents the selection from a select list. The select list may or may not allow multiple selections (defaults to only allow a single selection).

Related

{{ error_page }}

object

May be any object, including simple, complex and list objects. In some cases may even include symbols and null.

{{ text }}

string

Can be any text, from the empty string ("") to the full HTML output of the template. When used alone in a conditional, all strings evaluates as true - even if they are empty or a value such as "0" or "false".

{{ select_field }}

Should be used to display a select list inside a form.

{{ stylesheet }}

{{ template }}

number

Can be any number, including integers, decimals, or the value 0. Any value - including 0 - evaluates as true when used alone in a conditional.

integer

A whole (non-fractional, non-decimal) number. May be 0. Any value - including 0 - evaluates as true when used alone in a conditional.

list

An enumerable list containing zero or more objects. Lists may contain many different object types, although most lists only contain a single object type. There are a large number of other complex object types that are also lists (ag: an articlelist is a complex object but is also a list of article objects).

{{ select_field }}

Should be used to display a select list inside a form.

Properties of {{ select_field }} objects
Name Type Description
is_valid Boolean Will always be true
type String Will always be "select"
allow_multiple Boolean Whether or not to allow users to select more than one option from this select list
items object A dictionary containing all of the options and their values to be included in the select list, where the keys are the value to be stored and the values are the text to be displayed
options String The raw and un-parsed options for the select list
delimiter String The string that is used to distinguish one option from another in both the raw options property and the final saved value
value_delimiter String The string that should be used to distinguish the value for each option from the text to be displayed, where the value is to the left of value_delimiter and the text is to the right. Any options that do not contain the value_delimiter will use the full option as both the text and the value
count Integer The number of options in this select list
default_value String The raw and un-parsed default value for this select list. Includes the value of all options that should be selected by default, separated by the delimiter
map_to_attribute String If the user is signed into a profile when they submit this form and map_to_attribute is set, the profile attribute specified in map_to_attribute will be set to the value of this field. This should also be used to override the default value if the user is signed into a profile and the specified attribute has already been set
required Boolean Will be true if the user is required to select an option in this list
required_message String The message to display when the user attempts to submit the form without selecting an option in this list
validators validators The list of validators that should be used to validate this form field, if applicable
element_id String A helper property containing a unique ID for this field on this instance of this form. This value should be different every time the form is output
subtext text Help or hint text to display together with the field
condition condition The condition that should be used to show and hide this form field
classname String CSS class name(s) to be applied to the field
field_id String The identifier for this field
label String The label for this field
output String Default HTML markup for this field, which makes a number of assumptions about other elements on the page that may or may not be included. Developers should avoid using the default output in order to guarantee that forms work as expected, including styling, validation, conditionals, and more. May include additional markup in the editor preview to make it easier to edit content

Related

{{ form_field }}

{{ label_field }}

Should be used to display a text label inside a form.

object

May be any object, including simple, complex and list objects. In some cases may even include symbols and null.

{{ form }}

{{ dictionary }}

Object containing a list of key-value pairs where the keys are unique.

{{ submit_field }}

Should be used to display a submit button inside a form.

{{ checkboxlist_field }}

Should be used to display a list of checkboxes inside a form.

{{ select }}

{{ date }}

A field containing a user-selected date

{{ textarea_field }}

Should be used to display a textarea field inside a form.

{{ text }}

{{ hidden_field }}

Should be used to output a hidden field inside a form, which by definition is not displayed to or directly editable by users.

string

Can be any text, from the empty string ("") to the full HTML output of the template. When used alone in a conditional, all strings evaluates as true - even if they are empty or a value such as "0" or "false".

{{ date_field }}

Should be used to display a date field inside a form.

{{ button_field }}

Should be used to display a custom button inside a form.

{{ captcha_field }}

Should be used to display a captcha inside a form.

number

Can be any number, including integers, decimals, or the value 0. Any value - including 0 - evaluates as true when used alone in a conditional.

{{ profile }}

{{ condition }}

Represents the condition that should be used to show and hide form fields.

{{ file_field }}

Should be used to display a file upload field inside a form.