number.comp

The Number widget is used for input fields that should contain a numeric value.
Additional restrictions on the numbers can be specified.

Input Parameters:

Parameters

Parameter NameSorted ascending Description Default Value
AllNumDec if > 0 are kept zeros in the decimal equivalent to AllNumDec digits with AllNumDec < NumDec , end up working NumDec figures. 0
description Tooltip. Empty string
id Select ID. Undefined
length maximum number of characters allowed in the field ( NumCifre if not defined) Undefined
NumCifre number of total digits. 9
NumDec number of decimal. 0
readonly can't change state if in readonly mode. Undefined
ReturnNumDec number of decimal digits to be returned, even if they were zeros
(useful with sql numeric fields than return number with decimal zeros on the right)
0
size width in the field characters ( length == if not defined) Undefined
ValMax maximum number of accepted. 999999999999
ValMin minimum value of the number accepted. -999999999999
value value to render Empty string

Examples

Min and Maximum Value

<& /input/number.comp,
        id => 'testA1',
        NumCifre => 12,
        ValMax => 50000,
        ValMin => -5000,
        value => 50000,
        description => 'Test input maximum and min value',
&>
<& /input/number.comp,
        id => 'testA1bis',
        NumCifre => 12,
        ValMax => 50000,
        ValMin => -5000,
        value => -5000,
        description => 'Test input maximum and min value',
&>
<br>

NumberMinAndMaxExample.png

Real Value

<& /input/number.comp,
        id => 'testA2',
        values => '123.45',
        NumCifre => 12,
        ValMax => 50000,
        ValMin => -5000,
        value => 123.45,
        NumDec => 2,
        description => 'Test input real value',
&>

NumberDecimmalExample.png

AllNumDec

<& /input/number.comp,  
        id => 'testA3', 
        NumCifre => 12, 
        ValMax => 50000,
        ValMin => -5000,
        value => 1234, 
        NumDec => 4,   
        AllNumDec => 1,
        description => 'Test AllNumDec value',
&>

NumberWithAllNumDec.png

NumCifre

Maximum upto 3 digit allow to input because NumCifre value set 3.

<& /input/number.comp,   
        id => 'testA4',  
        NumCifre => 3,   
        ValMax => 1000,  
        ValMin => 10,    
        value => 999,    
        NumDec => 0,     
        AllNumDec => 1,  
        description => 'Test NumCifre',
&>

NumberNumCifre.png

The demo demonstration is available here.
I Attachment Action Size Date Who Comment
NumberDecimmalExample.pngpng NumberDecimmalExample.png manage 998 bytes 28 Mar 2016 - 17:05 DipenPatel Number Real Value Example
NumberMinAndMaxExample.pngpng NumberMinAndMaxExample.png manage 1 K 28 Mar 2016 - 17:05 DipenPatel Number Min and Maximum Value example
NumberNumCifre.pngpng NumberNumCifre.png manage 753 bytes 30 Mar 2016 - 16:10 DipenPatel NumCifre Example
NumberWithAllNumDec.pngpng NumberWithAllNumDec.png manage 1 K 28 Mar 2016 - 17:21 DipenPatel Number With AllNumDec Example
Topic revision: r14 - 24 Dec 2016, GuidoBrugnara
This site is powered by FoswikiCopyright (©) Leader.IT - Italy P.I. IT01434390223 Privacy policy & use of cookies