Example Code of the Form Tag

The following code is an example of the form tag. This code defines the Contact Note form:

<forms>

  <form id="SBL Contact Note" on_open="form_open()">

    <validation_rules>

      <rule message="Note Type is required." expression="item['Note Type'] != ''">

        <asserted_control id="NoteType"></asserted_control>

      </rule>

    </validation_rules>

    <script>

      <![CDATA[

        function form_open()

        {

          form.NoteType.required = true;

        }

      ]]>

    </script>

      <page id="General" tag="0x10A6" min_height="155" min_width="520">

        <cell>

          <stack layout="vert" padding="5">

            <cell>

              <stack layout="horz" spacing="3">

                <cell size="65">

                  <stack layout="vert" spacing="5">

                    <cell size="22">

                      <control class="static" id="0x20000">

                        <text>Type:</text>

                      </control>

                </cell>

                <cell size="22">

                  <control class="static" id="0x20002">

                    <text>Description:</text>

                  </control>

                </cell>

              </stack>

            </cell>

            <cell>

              <stack layout="vert" spacing="5">

                  <cell size="22">

                    <control class="combobox" id="NoteType" tab_order="1">

                      <source type="Contact.Contact_NoteNote TypePicklist" 
field="Value" format=":[:(Label):]"></source>

                      <field>Note Type</field>

                    </control>

                  </cell>

                  <cell>

                    <control id="0x103f" tab_order="2"></control>

                  </cell>

                </stack>

              </cell>

            </stack>

          </cell>

        </stack>

      </cell>

    </page>

  </form>

</forms>