Form globals

Form globals specify particular settings for the form and determine its physical characteristics. These settings are applied to all pages and items in the form. In other words, all pages and items inherit the form global settings.

Note that options defined within a page or item can override global settings for that particular page or item. Form globals appear within the global item in the globalpage, which appears at the beginning of a form. For example, the bgcolor option determines the background color of all pages in the form.

Available Options

activated, bgcolor, border, dirtyflag, enclosuresettings, focused, fontcolor, fontinfo, formid, keypress, label, orientation, previous, printbgcolor, printfontcolor, printing, printsettings, publicdata, requirements, saveformat, transmitformat, triggeritem, ufv_settings, version, xformsmodels

Note: For descriptions, see XFDL options and array elements.

Example

This example defines settings and characteristics for the form:

   <?xml version="1.0"?>
   <XFDL xmlns="http://www.ibm.com/xmlns/prod/XFDL/8.0"
      xmlns:xfdl="http://www.ibm.com/xmlns/prod/XFDL/8.0"
      xmlns:xforms="http://www.w3.org/2002/xforms">
      <globalpage sid="global">
         <global sid="global">
            <saveformat>application/vnd.xfdl</saveformat>
            <label>Time Sheet</label>
            <bgcolor>ivory</bgcolor>
            <fontinfo>
               <fontname>Helvetica</fontname>
               <size>10</size>
               <effect>plain</effect>
            </fontinfo>
         </global>
      </globalpage>
      ...

These global settings specify that:

Usage details

  1. Define form globals within the global item of the globalpage.
  2. The global item and the globalpage must always have a sid of global.
  3. The globalpage follows the XFDL tag.
  4. The publicdata option is optional. If specified in the global item as public, the instance name and bound element name are listed. For example,
    <publicdata>
       <dataref>
          <ref>instance('INSTANCE')/page1/field1</ref>
       </dataref>
    </publicdata>
  5. You can give the form a title that appears in the title bar by setting a global label option.
  6. When referencing form globals from within the form, the following syntax applies:
       global.global.option[n|name]
    

    For example:

       global.global.bgcolor