PHP Classes

mandatory sign

Recommend this page to a friend!

      HtmlForm PHP 5  >  All threads  >  mandatory sign  >  (Un) Subscribe thread alerts  
Subject:mandatory sign
Summary:how to add a "mandatory" sign to input elements
Messages:2
Author:w. studer
Date:2011-12-27 12:39:57
Update:2011-12-27 21:48:54
 

  1. mandatory sign   Reply   Report abuse  
Picture of w. studer w. studer - 2011-12-27 12:39:57
Hi

me again ...

My wish is to "mark" mandatory fields with a sign ( a character or an image) before or after the input field.

Any possibility ?

best regards
Wolfgang

  2. Re: mandatory sign   Reply   Report abuse  
Picture of Sebastian Schlapkohl Sebastian Schlapkohl - 2011-12-27 21:48:54 - In reply to message 1 from w. studer
I normally use one of two ways to do this:

- either use css-classes

- or add an asterisk to the label and add a CustomHtml to the Fieldset to explain the symbol, something like FieldSet::get()->addElement(CustomHtml::get()->setHtml('<span>* obligatory fields</span>'));