Typoscript

Why Typoscript? Because it is the base of TYPO3! Regardless of plugins which do not necessarily need Typoscript, core content objects need to be able to be build by Typoscript.

The basics

The FORM Typoscript uses the regular syntax of Typoscript.

Objects

Below are the objects currently used in the FORM Typoscript. They should look familiar to you if you are used to (X)HTML. Most of them are just a representation of the available tags. The only one not representing a tag is CONTENT.

  • FORM
  • BUTTON
  • CHECKBOX
  • CONTENT
  • FIELDSET
  • FILEUPLOAD
  • HIDDEN
  • IMAGEBUTTON
  • OPTGROUP
  • OPTION
  • PASSWORD
  • RADIO
  • RESET
  • SELECT
  • SUBMIT
  • TEXTAREA
  • TEXTLINE

FORM

Like the current cObj, the FORM begins with the object FORM

lib.form = FORM
lib.form {
    ...
}
Within the FORM object, the following will be declared:
  • Validation rules (not implemented yet).
  • Layout of the objects. The objects have a basic layout which will be suitable for most of your needs. But it is possible to change them globally or for each object separately.
  • Tag attributes of the FORM object.
  • Child objects of the FORM.

For instance, to start a simple form, you can use

lib.form = FORM
lib.form {
    method = post
    10 = FIELDSET
    10 {
        legend.value = This is my first form.
        10 = TEXTLINE
        10 {
            label.value = Enter you name:
        }
        20 = SUBMIT
    }
}

As you can see the two last declarations are done, the attributes of the FORM tag (method = post) and inserting child objects like a FIELDSET which has two children, TEXTLINE and SUBMIT.