Form configuration 

Setup only.

There are several forms which can be configured. Put the code after the form settings.

data

data
Type
string/->stdWrap
Default
depends on codefield

This is the data that sets up the form.

  • name: name of the form.
  • If empty, default values will be used.

Example:

searchform for the shop
plugin.tt_products.form.SEARCH.data.name = ShopSearchForm
Copied!

dataArray

dataArray
Type
[array of form elements]

Every entry in the dataArray is numeric and has four main properties

  • label
  • type
  • value
  • equired

label and value have stdWrap properties.

params: Put additional parameters here.

Example:

select for for adddresses
  form.SELECTAD.dataArray {
      10.label =
      10.type = tt_products[address]=select
      10.params = onchange="submit();"
  }

Enhancement for the selection of variants with :typoscript:`selectColor`, … specification.
Copied!
select for for adddresses
form.ALL.selectColor.dataArray {
    10.params = onchange="submit();"
}
Copied!

image

image
Type
IMAGE

Image to display

imageImport

imageImport
Type
array of fields

Fetch the images corresponding to values.

Example:

select for for adddresses
form.ALL.selectColor.imageImport {
    10.sql.where =
    10.prod.0 = earth-round.gif   
    10.prod.1 = marigold-round.gif
    10.prod.2 = delft-round.gif  
}
Copied!

layout

layout
Type
string

This defines how the input field and other markers are placed towards each other.

Example:

This substitutes the ###INPUT### with the input tag and the ###IMAGE### with image data.

substitution with input tag and image data
<tr><td>###INPUT###</td><td>###IMAGE###</td></tr>
Copied!

panel

panel
Type
array of string

Inserts a panel with various clickable buttons.

Example:

substitution with input tag and image data
form.ORDERS.panel.input.10 {
    marker = button1
    label = Sort by title:
    name = Button1
    params =
}
Copied!