Initialization scripts let you perform custom initialization of form field values. Thus, when a user opens a form in the Form Editor, the field value is set to its initial value. A field can have both an initial value and a current value, both of which are character strings. A field's initial value does not change unless the user edits it. Edited form values are not stored in the database until a user saves the form.
Follow these steps:
The form definition appears in the text editor.
<initialization language="javascript" client="eclipse">
editor.setTextFieldValue("mrcomponentname", "JavaScript value");
</initialization>
The initial values for the form field are set.
Example: Define Initialization Logic
An example of an initialization logic definition follows:
<initialization language="javascript" client="eclipse">
editor.setTextFieldValue("pacinitiator", "Hello");
editor.selectTab("Change Evaluation");
editor.setFocus("pactestplan");
</initialization>
When a user opens a form in the Form Editor, this block of JavaScript code is invoked and the form shows:
|
Copyright © 2013 CA.
All rights reserved.
|
|