Validation form and Validation pane customization

You can customize validation forms via script. That means that the validation form and, if foldering is enabled, the validation pane elements, such as fields, groups and labels, provide properties that can be modified in script. Most modifications are typically done at this point in the ValidationForm_DocumentLoaded and ValidationPanel_FolderLoaded events on class level are used to set the elements' properties. In addition, you can use user interactions to change the layout, for example by defining a button to expand or collapse all group boxes. In such a case you can also use the ButtonClicked event to set the properties when a user presses the corresponding button. However, you can make changes in other events as needed.

You can customize the form by defining a shortcut for a button, for example a database lookup search or a button to expand all group boxes and hide the button from the validation form. If you have several buttons that you want to hide you can place them on a separate tab and then hide this tab. Pressing the short cut performs the defined action, but the corresponding button is not visible on the form.

A validation form has various elements, such as fields, buttons and labels. The CscSpriptValidationForm object provides the following objects and collections for the elements that you can customize via script.

The CscSpriptValidationPanel object provides the following child objects and collections for the elements that you can customize via script.

Note For Thin Clients a few element properties are not supported or do have restrictions. For more details see Thin Clients layout customization limitations.

In general there are different ways to access an element. For example, a validation form field belongs to the collection of fields of the validation form as well as to the collection of fields of a specific tab. You can access a specific element either by its index or name or check whether an item exists. For more details, see the Scripting Object Reference Help.

ValidationForm.Fields.ItemByIndex(1).Enabled=True
ValidationForm.Tabs.Item(1).Fields.ItemByName("InvoiceNumber").Enabled=True

A validation form consists always of one tab that has the index 0 (ValidationForm.Tabs.Item(0)), but this is only displayed on a validation form if two or more tabs are defined.