This project is no longer maintained and no further public releases are planned.

No further support will be given.

Feel free to fork the git repository.

How to use ###is_error### markers

These markers allow you to display additional content if an error occurred for each form field or globally.

In your HTML template you can add these markers:

###is_error###
###is_error_[fieldname]###

Formhandler will search for content to replace these markers in the translation file and in the TypoScript setup.

In the translation file enter the values like:

<label index="is_error_field1">Error occurred in field1!</label> 

or enter a default message for all fields:

<label index="is_error_default">Error occurred!</label> 

or enter a global message used for the marker ###is_error###:

<label index="is_error">Error occurred!</label> 

A possible TypoScript configuration looks like this:

plugin.Tx_Formhandler.settings {
  isErrorMarker {
    global = Global message if an error occurred (filled into ###is_error###)
    default = class=”error” (filled into ###is_error_[fieldname]###
    field1 = TEXT
    field1.value = Some message (filled into ###is_error_field1###)
  }
}

Example:

###error_firstname###
<div class=”row” ###is_error_firstname###>
  <label for=”firstname”>###LLL:firstname###</label>
  <input type=”text” name=”formhandler[firstname]” value=”###value_firstname” />
</div>

Using this you can display an error message like “Firstname is missing” and add a CSS class to the surrounding DIV to highlight the row containing the error.


to top