P&T Multiselect has one setting, “Multiselect Options”, a single textarea in which you specify each option you want as part of the multi-select.
List one option per line:
Herbie Hancock
Miles Davis
The Beatles
Bob Dylan
You can optionally specify input values for each option, and organize options into optgroup
s:
Jazz
herbie : Herbie Hancock
miles : Miles Davis
Rock
beatles : The Beatles
bobby : Bob Dylan
The following parameters can be added to P&T Multiselect’s primary tag pair, :all_options
, :ol
, and :ul
tags:
sort="asc|desc"
backspace=
Calling your P&T Multiselect field with a tag pair allows you to fully customize the output:
<p>I like {favorite_things backspace="2"}{option}, {/favorite_things}.</p>
The following single variables are available within your tag pair:
{count}
{option}
{option_name}
{option}
.switch
:all_options
Tag PairIf you want to loop through each of your options, regardless of whether or not they’re selected, use this tag.
{favorite_things:all_options}
<p>I {if {selected} == ""}don’t{/if} like {option}.</p>
{/favorite_things:all_options}
The :all_options
tag pair supports each of the primary tag pair’s single variable tags, plus one more:
{selected}
:ol
and :ul
TagsReturns an ordered/unordered list of each of your selected options
<h3>My favorite things:</h3>
{favorite_things:ul sort="asc"}
:selected
TagFor use in conditionals; returns whether or not a particular option is selected.
{if {favorite_things:selected option="kittens"}}
<p>Kittens!!!</p>
{/if}
:total_selections
TagReturns the total number of selected options.