GlideForm - addOption(String fieldName, String choiceValue, String choiceLabel, Number choiceIndex)

Adds a choice to the choice list field at the position specified.

Table 1. Parameters
Name Type Description
fieldName String The field name.
choiceValue String The value stored in the database.
choiceLabel String The value displayed.
choiceIndex Number Order of the choice in the list. The index is into a zero based array.
Table 2. Returns
Type Description

g_form.addOption('priority', '2.5', '2.5 - Moderately High', 3);