Share:
Developers » Script Objects & Methods » ScriptFormField

PREVIOUS  |  NEXT

ScriptFormField


The following table lists the available methods for the ScriptFormField object:

Return TypeMethodExplanation
VoidclearErrorMessage()Clears the error message
Voidenable()Enables the field
Voiddisable()Disables the field
ObjectgetSelectedLabel()Returns the selected label
StringgetSystemId()Returns the field system ID
ObjectgetValue()Returns the field value
Voidhide()Hides the field
BooleanisEnabled()
Returns if the field is enabled
BooleanisHidden()Returns if the field is hidden
BooleanisReadonly()Returns true if the field read-only
BooleanisRequired()Returns if the field is required
BooleanisSelectedAll(Object values)

For this method:

  • Returns true if all values of the form fields are selected
  • The parameter value is a String with a list of system IDs separated with a comma
BooleanisSelectedAny(Object values)

This method:

  • Returns true if at least one value of the field is selected
  • Accepts field values that are separated with a comma
BooleanisUpdated()Returns whether the field is updated
VoidmoveAfter(String systemId)Moves the field to the location after the field of the system ID provided
VoidmoveBefore(String systemId)Move the field before the field with system ID provided
Voidreset()Resets the field
VoidsetAllowedValues(Object values)

For this method:

  • Sets a list of allowed predefined values and auto-complete form fields that users can select from
  • String values are system IDs separated by a comma.
VoidsetDisallowedValues(Object values)

For this method:

  • Sets a list of disallowed predefined values for auto-complete form fields
  • Values are String or List object
  • String values are system IDs separated by a comma
VoidsetEnabled(Boolean enabled)Sets whether the field is enabled or disabled
VoidsetErrorMessage(String message)Sets the error message
VoidsetHidden(Boolean hidden)Sets whether the field is hidden or visible
VoidsetLabelBackground(String value)Sets the background color of the field label
VoidsetLabelColor(String value)Sets the color of the field label
VoidsetLabelComment(String value)Sets the comment
VoidsetLabelCommentStyle(String value)Sets the comment style
VoidsetLabelFontSize(String value)Sets the font size of the field
VoidsetPredefinedValues(Object value, Char c)

For this method:

  • The value is a String or List object
  • String values are system IDs separated by a comma
  • Char is the delimiter for the label and value in the list of predefined values. If not set, a semicolon will be used by default. 
  • The expected format is Label$delimiterValue, where label is in the first place, and the value in the second.
VoidsetReadonly(Boolean readonly)Sets if the field is read-only
VoidsetRequired(Boolean required)Sets whether the field is required
FormFieldsetUseMultiValueStrings(Boolean)If false, the value with a comma or ampersand can be set as the value in a field with predefined values
VoidsetValue(Object value)Sets the field value
VoidsetValueBackground(String value)Sets the background color of the field value
VoidsetValueColor(String value)Sets the color of the field value
VoidsetValueComment(String value)Sets a comment for the field value
VoidsetValueCommentStyle(String value)Sets the style of the field value comment
VoidsetValueFontSize(String value)Sets the font size of the field value
Voidshow()Shows the field
Voidtoggle()Shows or hides a component