NumberText

Top  Previous  Next

NumberText is a special Process Field. It can be used inside or outside of a ProcessRecord Element. It cannot be used as an input field and it is not included in the submits. It is provided as an Ajax compatible text element that formats a number.

  <span mo:type="NumberText" mo:name="PRICE" mo:needsInit="true" 
      mo:props="
         value              : '{PRICE}',
         allowSign          : true, 
         precisionDigits    : 2" 
         round              : ${round}
         padZeros           : ${padZeros} 
         currencyFormatting : ${currencyFormatting} />

 

See NumberText Function Class in MoreMotion Face API.

Properties

value

The value of the date.

allowSign

Specify true if the value can be negative.

precisionDigits

The number of the precision digits that are visible after the decimal symbol.

round

Specify true to round the displayed value.

padZeros

Specify true to pad zeros at the right side when precision digits are less than the specified.

currenyFormatting

If the number value includes a currency symbol (e.g. '120.23 $'), this property can be used to format it.
 
Examples:
 

Value      Formatting   Result

---------- -----------  --------

123.23 $   $9           $120.23

123.23 $   $9           $ 120.23

123.23 TL  9 $          120.23 YTL

 
 

Required Javascript Files

This element requires the following Javascript files are linked to the page in the HEAD section of the HTML document as follows.

  <head> 
    ...
    <script type="text/javascript" src="moremotion/face/DateNum/Number.js"></script>
    <script type="text/javascript" src="moremotion/face/_resources/<language-code>/DateNum.js"></script>
  </head>