ufv_settings examples

errorcolor

The following examples show ways to insert error colors.

In each case, if an input item in the form receives an invalid entry, the background color of the item will change to hot pink.

   <ufv_settings>
      <errorcolor>255,105,180</errorcolor>
   </ufv_settings>

OR

   <ufv_settings>
      <errorcolor>HotPink</errorcolor>
   </ufv_settings>

OR

   <ufv_settings>
      <errorcolor>#EE6AA7</errorcolor>
   </ufv_settings>

helpcursor

The following example shows how to get the help cursor to be an arrow rather than an arrow with a question mark.

   <ufv_settings>
      <helpcursor>arrow</helpcursor>
   </ufv_settings>

backgroundcolor/foregroundcolor

The following example shows how to set the background and foreground colors for dropdown menus when the menu has focus.

<globalpage sid="global">
      <global sid="global">
         <ufv_settings>
            <focusbgcolor>#FF00FF</focusbgcolor>
            <focusfontcolor>#00FFFF</focusfontcolor>
         </ufv_settings>
      </global>
   </globalpage>
   <page sid="PAGE1">
      <global sid="global">
         <label>PAGE1</label>
         <ufv_settings>
            <focusbgcolor>#000000</focusbgcolor>
            <focusfontcolor>#FFFFFF</focusfontcolor>
          </ufv_settings>
      </global>
   ...
   </page>

mandatorycolor

The following examples show ways to set the mandatory colors.

In each case, the mandatory input items on the form will have a background color of misty rose. This background color will override any other background color stated in the form description, and cannot itself be overridden by a compute.

   <ufv_settings>
      <mandatorycolor>255,228,225</mandatorycolor>
   </ufv_settings>

OR

   <ufv_settings>
      <mandatorycolor>misty rose</mandatorycolor>
   </ufv_settings>

OR

   <ufv_settings>
      <mandatorycolor>#FF00CC</mandatorycolor>
   </ufv_settings>

menu

Menu settings allow you to control the appearance of the toolbar. Specifically, they allow you to either remove the toolbar, or hide or disable individual toolbar icons. Note that the Save Form and Save As buttons are both controlled by the save keyword. This means that they must both be on or off — you cannot set them individually.

Affecting the Entire Menu Toolbar

The following example removes the entire toolbar from the form:

   <ufv_settings>
      <menu>
         <visible>off</visible>
      </menu>
   </ufv_settings>

Affecting Individual Menu Icons

In a form with the following ufv_settings declaration, users will be able to select Print, Preferences, Check Spelling, Check All Spelling, and open the Viewer Help form. They will not be able to save the form, open another form, send mail, or access the help mode. Furthermore, the help mode and about icons will not be visible.

   <ufv_settings>
      <menu>
         <save>off</save>
         <print>on</print>
         <open>off</open>
         <mail>off</mail>
         <preferences>on</preferences>
         <spellcheck>on</spellcheck>
         <spellcheckall>on</spellcheckall>
         <help>hidden</help>
         <viewerhelp>on</viewerhelp>
         <about>hidden</about>
      </menu>
   </ufv_settings>
Note: The menu function does not prevent the form designer from adding controls for opening or saving forms, or from using other functions elsewhere in the form.

modifiable

The following example shows hot to set the modifiable setting to off. A form with this setting would be read-only. This is not a secure method of preventing a form from being altered, since the source code can still be changed. However, this can be used to prevent accidental changes.

   <ufv_settings>
      <modifiable>off</modifiable>
   </ufv_settings>

pagedonewithformaterrors

The following example shows how to prevent the users from going to another page until all errors are corrected:

<globalpage sid="global">
   <global sid="global">
      <ufv_settings>
          <pagedonewithformaterrors>deny</pagedonewithformaterrors>
      </ufv_settings></global></globalpage>
   </global>
</globalpage>

printwithformaterrors

The following examples show how to prevent users from printing the form until all errors have been corrected.

When this ufv_setting is place in a page global, it affects every the button in the form.

To apply printformaterrors to all of the print buttons in your form, place the setting in the form global.

   <globalpage sid="global">
      <global sid="global">
         <ufv_settings>
            <printwithformaterrors>deny</printwithformaterrors>
         </ufv_settings>
      </global>
   </globalpage>

When this ufv_setting is placed in a page global, it only affects the buttons on that page.

   <page sid="PAGE1">
      <global sid="global">
         <ufv_settings>
            <printwithformaterrors>deny</printwithformaterrors>
         </ufv_settings>
      </global>
      ...XFDL items...
   </page>

If you want printwithformaterrors to apply to only a single button, you must implement it in a compute that references the print button you want to affect. The following example shows a compute that toggles between permit and deny based on the activated state of a print button. This ensures that users are denied the ability to print a form that contains format errors unless they are using the specified print button.

   <ufv_settings>
      <printwithformaterrors compute="toggle( &#xA;
         page1.printButton.activated,'off', 'on') == '1' ? 'permit' : &#xA;
         'deny'"></printwithformaterrors>
   </ufv_settings>

A form with this setting will deny printing until the page1.printButton is clicked. When that button is clicked, the form will toggle to permit and will print even if there are type checking errors. Once printing is complete, the setting will toggle back to deny.

savewithformaterrors

The following examples show how to prevent users from saving the form until all errors have been corrected.

To apply savewithformaterrors to all of the save buttons in your form, place the setting in the form global.

   <globalpage sid="global">
      <global sid="global">
         <ufv_settings>
            <savewithformaterrors>deny</savewithformaterrors>
         </ufv_settings>
      </global>
   </globalpage>

To apply savewithformaterrors to all the save buttons on a single page, place it in the page global.

   <page sid="PAGE1">
      <global sid="global">
         <ufv_settings>
            <savewithformaterrors>deny</savewithformaterrors>
         </ufv_settings>
      </global>
      ...XFDL items...
   </page>

If you want savewithformaterrors to apply to only a single button, you must implement it in a compute that references the save button you want to affect. The following example shows a compute that toggles between permit and deny based on the activated state of a save button. This ensures that users are denied the ability to save a form that contains format errors unless they are using the specified save button.

   <ufv_settings>
      <savewithformaterrors compute="toggle( &#xA;
         page1.saveButton.activated,'off', 'on') == '1' ? 'permit' : &#xA;
         'deny'"></savewithformaterrors>
   </ufv_settings>

A form with this setting will deny printing until the page1.saveButton is clicked. When that button is clicked, the form will toggle to permit and will save even if there are type checking errors. Once saving is complete, the setting will toggle back to deny.

scrollfieldsonzoom

The following example shows how to turn the scroll bars off.

   <ufv_settings>
      <scrollfieldsonzoom>off</scrollfieldsonzoom>
   </ufv_settings>

signwithformaterrors

The following examples show how to prevent users from signing a form until all errors have been corrected.

To apply signwithformaterrors to all of the sign buttons in your form, place the setting in the form global.

   <globalpage sid="global">
      <global sid="global">
         <ufv_settings>
            <signwithformaterrors>deny</signwithformaterrors>
         </ufv_settings>
      </global>
   </globalpage>

To apply signwithformaterrors to all the sign buttons on a single page, place it in the page global.

   <page sid="PAGE1">
      <global sid="global">
         <ufv_settings>
            <signwithformaterrors>deny</signwithformaterrors>
         </ufv_settings>
      </global>
      ...XFDL items...
   </page>

If you want signwithformaterrors to apply to only a single button, you must implement it in a compute that references the signature button you want to affect. The following example shows a compute that toggles between warn and deny based on the activated state of a signature button. This ensures that users are denied the ability to sign a form that contains format errors unless they are using the specified signature button.

   <ufv_settings>
      <signwithformaterrors compute="toggle( &#xA;
         page1.signButton.activated,'off', 'on') == '1' ? 'warn' : &#xA;
         'deny'"></signwithformaterrors>
   </ufv_settings>

A form with this setting will deny signing until the page1.signButton is clicked. When that button is clicked, the form will toggle to warn and will alert users to formatting errors, but still allow them to sign the form. Once the form is signed, the setting will toggle back to deny if the ufv_settings has not been signed. To exclude this compute from the signature button, you must omit it from the signature. One way to do this is to omit ufv_settings from the signoptions filter in the signature button. For example:

   <signoptions>
      <filter>omit</filter>
      <optionrefs>ufv_settings</optionrefs>
   </signoptions>

submitwithformaterrors

The following examples show how to prevent the users from submitting the form until all errors have been corrected.

To apply submitwithformaterrors to all of the submit buttons in your form, place the setting in the form global.

   <globalpage sid="global">
      <global sid="global">
         <ufv_settings>
            <submitwithformaterrors>deny</submitwithformaterrors>
         </ufv_settings>
      </global>
   </globalpage>

To apply submitwithformaterrors to all the submit buttons on a single page, place it in the page global.

   <page sid="PAGE1">
      <global sid="global">
         <ufv_settings>
            <submitwithformaterrors>deny</submitwithformaterrors>
         </ufv_settings>
      </global>
      ...XFDL items...
   </page>

If you want submitwithformaterrors to apply to only a single button, you must implement it in a compute that references the submit button you want to affect. The following example shows a compute that toggles between permit and deny based on the activated state of a submit button. This ensures that users are denied the ability to submit a form that contains format errors unless they are using the specified submit button.

   <ufv_settings>
      <submitwithformaterrors compute="toggle( &#xA;
         page1.submitButton.activated,'off', 'on') == '1' ? 'permit' : &#xA;
         'deny'"></submitwithformaterrors>
   </ufv_settings>

A form with this setting will deny submitting until the page1.submitButton is clicked. When that button is clicked, the form will toggle to permit and will submit even if there are type checking errors. Once submitting is complete, the setting will toggle back to deny.

validoverlap

The following example shows how to create a setting that allows signed items to overlap unsigned items by 4 pixels or less.

   <ufv_settings>
      <validoverlap>4</validoverlap>
   </ufv_settings>