Creating Form Scripts

Form scripts are created from the Create Button. You need to specify a unique filename for the script in the dedicated scripting workspace. You can optionally select a document that already has the script you need otherwise a blank script file will be created. If you specify a document to upload then a new script file is created from the specified file and the original file left untouched.

Note:

An individual script can only be associated with one form. The same script cannot be triggered by two different forms or even form events. An individual form may trigger as many scripts as necessary.

Example of a row in the script deployment list view.

To create a form script:

  1. Go to Administration > Scripting Center > Form. The list view for form scripts appears.

  2. Click the Create button.

    Adding a new form script deployment using the Create menu.
  3. Click the type of form script you want to create under “New”. The “New document” dialog appears.

  4. Type a filename for the script into the “Filename” dialog.

  5. If you want to import an already written form script, click Choose File and select the script’s file.

  6. Click Save. The list view for form scripts appears.

  7. Click on the Script link in the Scripting Center to open the script in the Scripting Studio.

  8. Type the script into the editor and then fill out fields in the Scripting Studio Tools and Settings:

    1. Select the user that the script will run for ‘In testing’ state, see Testing and Debugging.

    2. Select any libraries referenced by this script.

    3. Select whether the script is executed On Submit, Before save, or After save.

    4. Select the Entrance function, the name of your function to run in the editor, see Entrance Function.

    5. Use the Code revision comments to comment the script changes made.

    6. Click SAVE.

    Note:

    The act of saving a script in the ”Inactive” state will move the script to the ”In testing” state, see Scripting Workflow.

After a script is created, you can edit the script by clicking on the script link, move the script through the Scripting Workflow, or view any log messages the script has generated using the “View Log” link, see Testing Form Scripts.

Tip:

To reduce the errors in your scripts, see Scripting Best Practices.

Scripts need to be carefully tested before being deployed to production. See Testing Form Scripts and Scripting Workflow for details.

For more details see: