FF Multi-select

FF Multi-select gives you a multi-select input within a field or FF Matrix cell.

Configuration

FF Multi-select has one setting, “Select 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 optgroups:

Jazz
    herbie : Herbie Hancock
    miles : Miles Davis
Rock
    beatles : The Beatles
    bobby : Bob Dylan

Templates

Tag parameters

The following parameters can be added to FF Multi-select’s primary tag pair, :all_options, :ol, and :ul tags:

sort="asc|desc"

Sort the options in ascending or descending order

backspace="2"

Strip the last X characters from the tag output

Primary tag pair

Calling your FF Matrix field with a tag pair allows you to fully customize the output:

<p>I like {favorite_things backspace="2"}{option}, {/favorite_things}.</p>

Single variable tags

The following single variables are available within your tag pair:

{count}

The current option’s index

{option}

The current option

{option_name}

If you specified a name for your option, this is how you access it. Otherwise, it will return the same thing as {option}.

switch="odd|even"

Switch between multiple values based on the current option index

:all_options tag pair

If 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}

Single variable tags

The :all_options tag pair supports each of the primary tag pair’s single variable tags, plus one more:

{selected}

For use in conditionals; returns whether or not the current option is selected.

:ol and :ul tags

Returns an ordered/unordered list of each of your selected options

<h3>My favorite things:</h3>
{favorite_things:ul sort="asc"}

:selected tag (new)

For use in conditionals; returns whether or not a particular option is selected.

{if {favorite_things:selected option="kittens"}}
   <p>Kittens!!!</p>
{/if}