P&T Dropdown has one setting, “Dropdown Options”, a single textarea in which you specify your select’s options.
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
You can also create a blank option by adding a blank line at the top. Or give the blank option a label:
: Select one...
(Note there’s a space before the colon.)
Calling your P&T Dropdown field with a single tag returns the selected option’s value:
<p>I really like {favorite_thing}.</p>
:label
TagReturns the label of the selected option. (Only useful if you have specified the input values)
<p>I really like <a href="{favorite_thing}">{favorite_thing:label}</a>.</p>
: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_thing:all_options}
<p>I {if {selected} == ""}don’t{/if} really like {option}.</p>
{/favorite_thing:all_options}
The following tag parameters can be added to P&T Dropdown’s :all_options
tag:
sort="asc|desc"
backspace=
The following single variables are available within your :all_options
tag pair:
{option}
{option_name}
{option}
.{count}
{switch}
{selected}