DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Change the layout of the whole formΒΆ

Attention

It is not recommended to change the layout globally for the whole form. Unfortunately, using view specific layout settings did not work for a long time and is now widely used by integrators.

There are several reasons for not to use global layout settings:

  • Some objects cannot be changed globally.
  • Changing some objects will cause problems which lead to failures in the processing. The code will die with PHP errors.
  • Quite often it does not make sense to do these changes globally.

Instead change the layout for a specific view!

Apart from the above mentioned problems one could change the layout globally using the following TypoScript setup. Using tt_content.mailform.20 registers the chances for all forms of the below the page tree. If one wants to change the layout only for a specific form, a TypoScript library could be build as shown here.

tt_content.mailform.20 {
  layout {
    # changing the layout of the form object globally
    form (
      <form class="form-class">
        <containerWrap />
      </form>
    )
  }
}

As one can see, an (X)HTML kind of markup is used. Actually it is XML, with some extra tags like the containerWrap.