NumberBox

Top  Previous  Next

NumberBox is a Process Field. It can be used inside or outside of a ProcessRecord Element. It encloses a hidden and a text input elements. The text input element is used to edit the value and the hidden input element is used submit the value in submit format.

  <span mo:type="NumberBox" mo:field="true" mo:name="PRICE" mo:needsInit="true" 
       mo:iValue="{PRICE}"
       mo:props="
          allowSign       : true, 
          precisionDigits : 2, 
          round           : ${round}
          padZeros        : ${padZeros}
          nonBlank        : true, 
          validValues     : '1:22', 
          valHandler      : ValHandler, 
          valErrorHandler : ValErrorHandler
       ">
    <input type="hidden" name="pf_PRICE"/>
    <input type="text" name="__t"  
           onblur="if (NumMgr.formatInput(this,true) == false) return false;" 
           onkeyup="if (NumMgr.formatInput(this) == false) return false;" />
  </span>

The grouping separator and the decimal point symbol characters are taken from the nearest enclosing pageInfo definition.

 

See NumberBox Function Class in MoreMotion Face API.

Properties

allowSign

Specify true if the value can be negative.

precisionDigits

The number of the precision digits that can be entered 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.

 
See Validation Properties

Note that the validation properties are effective only if the this is placed into a Process Record.

 

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>