with CP form you can add classes only to input fields.
And in case of errors:
a) the error messages appears solely - isolated.
b) the CSS class 'error' is applied only to input fields
Error tags are never applied to labels.
Because of that there are some limitations:
a) you only can take an affect on the styling of the input field
b) or the [isolated] error messages
but you cannot change or edit <label>
What do I want to have in case of errors:
a certain color of the label tag
Today I stumbled over the solution:
THAT'S THE WAY YOU CAN DO:
in your custom form template
Code: Select all
<label for="email"[IF_ERROR] class="MYerror"[/IF_ERROR]>E-Mail<strong>*</strong></label>{email}
You need the input field have set marked 'required'.
Output HTML:
Code: Select all
<label for="email" class="MYerror">E-Mail<strong>*</strong></label><input type="text" name="email" id="email" value="" class="error" />
useful CSS now available:
Code: Select all
label.MYerror ....aus die maus