Jump to content

auFormNumber: Difference between revisions

From auWiki
new auFormNumber: add minval, maxval, step
m new auFormNumber: remove note on default step for integers
 
Line 26: Line 26:
* ''$minval'' = The minimum acceptable value the field can accept.  Default is no minimum.
* ''$minval'' = The minimum acceptable value the field can accept.  Default is no minimum.
* ''$maxval'' = The maximum acceptable value the field can accept.  Default is no maximum.
* ''$maxval'' = The maximum acceptable value the field can accept.  Default is no maximum.
* ''$step'' = Values must be a multiple of this number.  Default is no step, or 1 for integers.
* ''$step'' = Values must be a multiple of this number.  Default is no step.

Latest revision as of 14:27, 1 February 2011

The auFormNumber class is part of the auLib package. It is defined in the auForm.php file.

Hierarchy

Usage

This class is used to add a numeric input field to a form. Create an object from this class and add it to an auFormContainer object.

Public Functions

new auFormNumber

new auFormNumber($name, $label, $tooltip, $required, $default, $width, $maxlength, $minval, $maxval, $step)

Creates a new numeric input form field.

  • $name = Name to submit the field as.
  • $label = Label to display with the field. Default is blank.
  • $tooltip = Tooltip text to display when the mouse is over the label. Default is none.
  • $required = Whether a value is required in this field. Default is not required.
  • $default = Default value for this field. Default is blank / unchecked.
  • $width = Width of the field in characters. Default is browser default.
  • $maxlength = The maximum number of characters the field can accept. Default is unlimited.
  • $minval = The minimum acceptable value the field can accept. Default is no minimum.
  • $maxval = The maximum acceptable value the field can accept. Default is no maximum.
  • $step = Values must be a multiple of this number. Default is no step.