Creating or configuring forms > Configuring the <components> element

6.1 Configuring the <components> element

To configure the components element

  1. In the configurable XML file corresponding to the form you are creating, usually in the Viewpoint home directory, locate the <components> element.
  2. For each input, insert a <component> element inside <components>. Assign the inserted component a unique id such as "priority". For example:
  3. <components>
      ...
        <component id="priority">...</component>
      ...
    </components>
    
  4. Apply the description attribute of <component> to any string you want to use as a label in the user interface for the component. The default is an empty string.
  5. Use the required attribute of <component> to specify whether the component is required. (The user must enter data to pass page validation.) The default is "false".
  6. The <label> component does not support the required attribute.

  7. Use the editable attribute of <component> to specify whether the component is editable by the user. The default is "true".
  8. The <label> component does not support the editable attribute.

  9. Use the permission attribute of <component> to specify which permissions are required to view the component. The value can be any permission. See Setting permissions.
  10. <component id="priority" required="false" permission="power-user">
      <description>Priority</description>
      <number-value type="int">
        <default>0</default>
        <minimum inclusive="true">-10000</minimum>
        <maximum inclusive="true">10000</maximum>
        <step>1</step>
      </number-value>
    </component>

    The user must have the "power-user" permission to see the priority component.

  11. Configure any of the following components:
  12. Set any desired component rules. See Setting component rules.

Related topics