OptionBox

Top  Previous  Next

OptionBox is a Process Field and it can be used inside or outside a ProcessRecord Element. It encloses one <input type="radio" /> elements for each choice and it behaves like a single input field.

  <tr mo:type="ProcessRecord"> 
    <td>
      <span mo:type="OptionBox" mo:name="GENDER" mo:value="{GENDER}" 
            mo:props="warnColor:'#FFCC99', nonBlank:true, 
                      valHandler:MyValHandler, valErrorHandler:MyErrorHandler">
        <input type="radio" value="M" /> Male <br/>
        <input type="radio" value="F" /> Female
      </span>
     </td>
  </tr>

See OptionBox function class in  MoreMotion Face API.

warnColor property

The color code given with this property is used to highlight the background of the element when a validation failure occurs.

 

See Validation Properties

 

Required Javascript File

In addition to the standard ones, this element requires that OptionBox.js Javascript file is linked to the page in the HEAD section of the HTML document as follows.

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