pclib  2.9.5
Lightweight PHP framework
Common form tag attributes

These attributes can be used in any form template tag.

  • lb "string" - Text description of the element. Use {TAGNAME.lb} for printing.
  • required - Form element is required (must be non-empty)
  • size "n" - Size of form element. "n" is number or "size/maxlength" or matrix e.g. "10x20"
  • nosave - Element will not be saved into database
  • noedit - Element is read-only
  • onvalidate "func" - Replace default validation of the element with user defined function. See PClib callback functions.
  • html5 - Enable html5 for particular element
  • format "nhHulsf" - Enable preformating for particular element
  • hint "string" - Create html5 placeholder atribute
  • html_* - Any string with prefix "html_" is considered to be html attribute of generated html tag. Ex: input TEST html_class "test" html_style "width:100%"

In addition you can use Common attributes of template tags too.

You can use following tag modificators:

  • {TAGNAME.lb} Print label of element
  • {TAGNAME.err} Print error message, if field TAGNAME has not valid value. It is set by function Form->validate()
  • {errors} Print all error messages of the form. It is set by function Form->validate()