SetSelectOptionsPreProcessor

Sets a named Options array for select boxes.

TypoScript Path

plugin.tx_formhandler_form.settings.predefinedForms.[x].preProcessors

Example Code:

preProcessors {
  setSalutations {
    model = SetSelectOptionsPreProcessor
    config {
      name = salutation
      options {
        mr {
          value = mr
          title = Mr.
        }
        mrs {
          value = mrs
          title = Mrs.
        }
      }
    }
  }
  setCountry {
    model = SetSelectOptionsPreProcessor
    config {
      name = country
      options {
        DE {
          value = DE
          title = Germany
        }
        USA {
          value = USA
          title = United States of America
        }
      }
    }
  }
}

Properties

name

Set a name for this key value array

Mandatory

True

Data Type

String

Note

Must be unique

options

Option array for the select box options

Mandatory

True

Data Type

Array<String, Option>

Option

value

The value for the select box option.

Mandatory

True

Data Type

String

title

The title for the select box option

Mandatory

True

Data Type

String