GlideModalFormV3 - Client

Displays a form in a GlideModal.

General usage of the GlideModalForm class involves creating the object, setting any preferences, and then rendering the GlideModalForm.
var d = new GlideModalForm('dialog title', 'table_name_or_form_name', [callback on completion of submit])
         d.setPreference('name', 'value');
         d.render();

Specify the query parameters that are passed to the form using setPreference(). Any name/value pair that you specify with setPreference() is sent along with the form POST request to display the form.

The GlideFormModal is set to fill the height of the document window.

GlideModalFormV3 - addParm(String name, String value)

Sets the specified parameter to the specified value.

Table 1. Parameters
Name Type Description
name String The parameter name.
value String The parameter value.
Table 2. Returns
Type Description
void

GlideModalFormV3 - GlideModalForm(String title, String tableName, Function onCompletionCallback, Boolean readOnly)

Creates an instance of the GlideModalForm class.

Table 3. Parameters
Name Type Description
title String The form title.
tableName String The table being shown.
onCompletionCallback Function The function to call after the form has been submitted and processed on the server. The callback function has the form callbackFunction(String action_verb, String sys_id, String table, String displayValue) where
  • action_verb is the name of the UI action executed. Examples are sysverb_insert (Submit button), sysverb_cancel, sysverb_save (Save button).
  • sys_id is the sys_id of the affected record.
  • table is the name of the table containing the record.
  • displayValue
var d = new GlideModalForm('dialog title', 'table_name_or_form_name', [callback on completion of submit])
         d.setPreference('name', 'value');
         d.render();

GlideModalFormV3 - render()

Shows the form.

Table 4. Parameters
Name Type Description
None
Table 5. Returns
Type Description
void

GlideModalFormV3 - setCompletionCallback(Function callbackFunction)

Sets the function to be called when the form has been successfully submitted and processed by the server.

The callback function has the form callbackFunction(String action_verb, String sys_id, String table, String displayValue) where
  • action_verb is one of "sysverb_insert" ...
  • sys_id is the sys_id of the affected record.
  • table is the name of the table containing the record.
  • displayValue
Table 6. Parameters
Name Type Description
callbackFunction Function The callback function that you provided to be called when the form has been successfully processed. The callback function has the form callBackFunction(GlideModalForm obj)
Table 7. Returns
Type Description
void

GlideModalFormV3 - setOnloadCallback(Function callbackFunction)

Sets the function to be called after the form has been loaded.

Table 8. Parameters
Name Type Description
callbackFunction Function The function to be called after the form has been loaded. The callback function has the form callBackFunction(GlideModalForm obj)
Table 9. Returns
Type Description
void

GlideModalFormV3 - setSysID(String sys_id)

Sets the object's sys_id preference.

Table 10. Parameters
Name Type Description
sys_id String The id preference. One of the query parameters passed to the form.
Table 11. Returns
Type Description
void