Tags
These terms are used throughout the documentation:
required: This parameter/field is required for this tag to function.
form only: This can only be set as a field in the form and not as a parameter in the tag.
param only: This parameter can only be set in the tag and not as a field in the form.
fixed value: This field cannot be edited and is set with a fixed value.
recurring only: This parameter/field only applies to recurring charges.
one-time only: This parameter/field only applies to one-time charges.
added in X.X.X: This parameter/field is only available from this version forward.
logged in: This tag is only available if the user is logged in.
required: This parameter/field is required for this tag to function.
form only: This can only be set as a field in the form and not as a parameter in the tag.
param only: This parameter can only be set in the tag and not as a field in the form.
fixed value: This field cannot be edited and is set with a fixed value.
recurring only: This parameter/field only applies to recurring charges.
one-time only: This parameter/field only applies to one-time charges.
added in X.X.X: This parameter/field is only available from this version forward.
logged in: This tag is only available if the user is logged in.
has the following front-end tags:
Primary Tag Pair Checkbox
- Checkboxes has one setting, “Checkbox Options”, a textarea in which you specify each checkbox option you want as part of the group.
Dropdown
- Dropdown has one setting, “Dropdown Options”, a textarea in which you specify your select’s options.
List
- The following tags are available for your List fields within {exp:channel:entries} and Matrix tag pairs.
Multiselect
- Multiselect has similar configuration as checkbox does as well as the same Tag parameters and Variable tags
Pill
- Pill has similar configuration as checkbox does as well as the same Tag parameters and Variable tags
Radio Buttons
- Radio Buttons has similar configuration as checkbox does as well as the same Tag parameters and Variable tags
Switch
- Switch has similar Tag parameters and Variable tags as checkbox does
Primary Tag Pair Checkbox
Checkboxes has one setting, “Checkbox Options”, a textarea in which you specify each checkbox option you want as part of the group.
Tag Parameters
- sort
- Sorts the selected options alphabetically. Can be set to either “asc” or “desc”.accepts: desc or asc
{my_checkboxes_field sort="desc"}{option}, {/my_checkboxes_field}
- backspace
- Strips the last X characters from the {option_name} tag output.
{my_checkboxes_field backspace="2"}{option}, {/my_checkboxes_field}
vars
- countvar
- The current option’s index.
{count}
- optionvar
- The current option’s value.
{option}
- option_namevar
- If you specified a label for your option, this is how you access it. Otherwise, it will return the same thing as {option}.
{option_name}
- switchvar
- Switch between multiple values based on the current option index.
{switch}
Tag Parameters
- sort
- Sorts the selected options alphabetically. Can be set to either “asc” or “desc”.accepts: “asc” or “desc”
<h3>My favorite things:</h3>
{my_checkboxes_field:ul sort="asc"}
Tag Parameters
- option
- Which option are we conditioning
{if '{my_checkboxes_field:selected option="kittens"}'}
<p>Kittens!!!</p>
{/if}
Defaulted
- How many checkboxes are checked
I have {my_checkboxes_field:total_selections} favorites.
Dropdown
Dropdown has one setting, “Dropdown Options”, a textarea in which you specify your select’s options.
Tag Parameters
- label
- Returns the label of the selected option.
{<p>I really like <a href="{my_dropdown_field}">{my_dropdown_field:label}</a>.</p>}
Variables
- option
- The selected option’s value
{option}
- label
- The selected option’s label.
{label}
List
The following tags are available for your List fields within {exp:channel:entries} and Matrix tag pairs.
Variables
- item
- The current list item.
{item}
- example of ol and ul
- Returns an ordered/unordered list of each of your selected options
My favorite things:{my_list_field:ul}
- example2
- If you want to use a List field within Content Elements, use the following template:
- {item} {/values}{/fieldpack_list}
{fieldpack_list}{values}
Multiselect
Multiselect has similar configuration as checkbox does as well as the same Tag parameters and Variable tags
Multiselect Configuration Examples
- example 1
- List one option per line:
Herbie Hancock
Bob Dylan
The Bad Plus
- example 2
- You can optionally specify each option’s value separately from its label:
herbie : Herbie Hancock
bobby : Bob Dylan
tbp : The Bad Plus
Field Tags
- sort
- Sorts the selected options alphabetically. Can be set to either “asc” or “desc”.
{sort="desc"}
- backspace
- Strips the last X characters from the {option_name} tag output.
{backspace="7"}
Pill
Pill has similar configuration as checkbox does as well as the same Tag parameters and Variable tags
Pill Configuration Examples
- example 1
- List one option per line:
Herbie Hancock
Bob Dylan
The Bad Plus
- example 2
- You can optionally specify each option’s value separately from its label:
herbie : Herbie Hancock
bobby : Bob Dylan
tbp : The Bad Plus
Field Tags
- sort
- Sorts the selected options alphabetically. Can be set to either “asc” or “desc”.
{sort="desc"}
- backspace
- Strips the last X characters from the {option_name} tag output.
{backspace="7"}
Radio Buttons
Radio Buttons has similar configuration as checkbox does as well as the same Tag parameters and Variable tags
Radio Buttons Configuration Examples
- example 1
- List one option per line:
Herbie Hancock
Bob Dylan
The Bad Plus
- example 2
- You can optionally specify each option’s value separately from its label:
herbie : Herbie Hancock
bobby : Bob Dylan
tbp : The Bad Plus
Field Tags
- sort
- Sorts the selected options alphabetically. Can be set to either “asc” or “desc”.
{sort="desc"}
- backspace
- Strips the last X characters from the {option_name} tag output.
{backspace="7"}
Switch
Switch has similar Tag parameters and Variable tags as checkbox does
Configuration
- Switch fields have five settings: OFF Label The label of the “OFF” (left) position of the switch in the CP. OFF Value The value of the field when it is switched off (to the left).
{**Note:** Leave this setting blank if you want to be able to use your field in simple template conditionals:
{if my_pill_field}
Hot!
{if:else}
Not hot.
{/if}
Otherwise you will need to be checking for the specific ON/OFF value:
{if my_pill_field == "hot"}
Hot!
{if:else}
Not hot.
{/if}}