CheckBox

Top  Previous  Next

CheckBox is a Process Field and it should be placed into a ProcessRecord Element.

  <tr mo:type="ProcessRecord"> 
    <td>
      <input type="checkbox" name="pf_ACTIVE" onclick="PMgr.fieldChanged(this)"
             mo:name="ACTIVE" mo:type="CheckBox" mo:field="true" mo:iValue="false" />
    </td>
  </tr>

The initial status of a CheckBox (checked or not) can be defined dynamically using XSL code as follows.

  <input type="checkbox" name="pf_ACTIVE" onclick="PMgr.fieldChanged(this)"
    mo:name="ACTIVE" mo:type="CheckBox" mo:field="true" >
    <xsl:if test="boolean(ACTIVE = 'true')">
      <xsl:attribute name="checked">checked</xsl:attribute>
      </xsl:if>
    <xsl:attribute name="mo:iValue">
      <xsl:value-of select="ACTIVE = 'true'"/>
    </xsl:attribute>
  </input>

See CheckBox function class in  MoreMotion Face API.