INumber
From FiFormsWiki
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 |
[edit]
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
[edit]
Method Detail
[edit]
Methods inherited from iInput
- checkRO
- drawInput
- getValueToSave
- hide
- iInput
- throwError
[edit]
iNumber
Constructs a new iNumber object.
Syntax: iNumber($dbField,$caption)
[edit]
Parameters
$dbField - Name of bound database field
$caption - (optional) Field caption. If omitted, set to the dbField name.
[edit]
Examples
Example
Declaring a simple iNumber on a form
$frm->inputs[] = new iNumber('PROD_PRICE','Price');
[edit]
Returns
A new iNumber object


