INumber

From FiFormsWiki

Jump to: navigation, search

class iNumber extends iInput

The class creates a data-bound input specialized for numerical data, with enforced formatting, fixed decimal places, and a simple javascript calculator.

Contents

Properties

$digits Total number of digits allowed in the field, including the decimal places
$decimals The number of decimal places. A value of 0 restricts values to integer values
$decpoint Decimal point character. Default is period (.)
$thseperator Thousands seperator. Default is comma (,). Set to an empty string ("") to disable.
$type The type of text input. This is simply echoed to the output as type="%type%". Default is "text".


Properties inherited from iInput: $caption $currentRec $dbField $error $errorMsg $formatStr $formatStrRO $otherTags $readOnly $section $value $valueToSave

Method Detail

Methods inherited from iInput

  • checkRO
  • drawInput
  • getValueToSave
  • hide
  • iInput
  • throwError


iNumber

Constructs a new iNumber object.

Syntax: iNumber($dbField,$caption)


Parameters

$dbField - Name of bound database field

$caption - (optional) Field caption. If omitted, set to the dbField name.

Examples

Example


Declaring a simple iNumber on a form

  $frm->inputs[] = new iNumber('PROD_PRICE','Price');

Returns

A new iNumber object

Personal tools