N/ui/serverWidget Module
Use the N/ui/serverWidget module to work with the user interface within NetSuite. You can use Suitelets to build custom pages and wizards that have a NetSuite look-and-feel. You can also create various components of the NetSuite UI (for example, forms, fields, sublists, tabs).
SuiteScript does not support direct access to the NetSuite UI through the Document Object Model (DOM). The NetSuite UI should only be accessed using SuiteScript APIs .
When you add a UI object to an existing NetSuite page, to minimize the occurrence of field/object name conflicts, the internal ID that references the object must be prefixed with custpage
.
In This Help Topic
N/ui/serverWidget Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Object |
Object |
Suitelets and beforeLoad user events |
A scriptable, multi-step NetSuite assistant. |
|
Object |
Suitelets and beforeLoad user events |
A step within a custom NetSuite assistant. |
||
Object |
Suitelets and beforeLoad user events |
A button that appears in a UI object. |
||
Object |
Suitelets and beforeLoad user events |
A NetSuite field. |
||
Object |
Suitelets and beforeLoad user events |
A field group. |
||
Object |
Suitelets and beforeLoad user events |
A NetSuite form. |
||
Object |
Suitelets and beforeLoad user events |
A list. |
||
Object |
Suitelets and beforeLoad user events |
A list column. |
||
Object |
Suitelets and beforeLoad user events |
A NetSuite sublist. |
||
Object |
Suitelets and beforeLoad user events |
A NetSuite tab and subtabs. |
||
Method |
Suitelets and beforeLoad user events |
Creates and returns a new assistant object. |
||
Suitelets and beforeLoad user events |
Creates and returns a new form object. |
|||
Suitelets and beforeLoad user events |
Creates a List object (specifying the title, and whether to hide the navigation bar). |
|||
Enum |
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for submit actions performed by the user. |
|
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for supported field break types. This enum is used to set the value of the Field.updateBreakType(options) property. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for supported field display types. This enum is used to set the value of the Field.updateDisplayType(options) property. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for the supported types of field layouts. This enum is used to set the value of the Field.updateLayoutType(options) property. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the values for supported field types. This enum is used to set the value of the Field.type property. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for supported page link types on a form. This enum is used to set the value of the |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for supported justification layouts. This enum is used to set the value of the align parameter when List.addColumn(options) is called. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for supported list styles. This enum is used to set the value of the List.style property. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for supported sublist display types. This enum is used to set the value of the Sublist.displayType property. |
||
string (read-only) |
Suitelets and beforeLoad user events |
Holds the string values for valid sublist types. This enum is used to define the |
Assistant Object Members
The following members are called on the serverWidget.Assistant object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Suitelets and beforeLoad user events |
Adds a field to an assistant. |
||
Suitelets and beforeLoad user events |
Adds a field group to an assistant. |
|||
Suitelets and beforeLoad user events |
Adds a step to an assistant. |
|||
Suitelets and beforeLoad user events |
Adds a sublist to an assistant. |
|||
Suitelets and beforeLoad user events |
Gets a field object. |
|||
Suitelets and beforeLoad user events |
Gets a field group object. |
|||
string[] |
Suitelets and beforeLoad user events |
Gets all the field group IDs in an assistant. |
||
string[] |
Suitelets and beforeLoad user events |
Gets all the field IDs in an assistant. |
||
string[] |
Suitelets and beforeLoad user events |
Gets all field IDs in the assistant field group. |
||
string |
Suitelets and beforeLoad user events |
Gets the last action submitted by the user. |
||
Suitelets and beforeLoad user events |
Gets the step that the last submitted action came from. |
|||
Suitelets and beforeLoad user events |
Gets the next step prompted by the assistant. |
|||
Suitelets and beforeLoad user events |
Returns a step in an assistant. |
|||
number |
Suitelets and beforeLoad user events |
Gets the total count of steps in the assistant. |
||
Suitelets and beforeLoad user events |
Gets all the steps in the assistant. |
|||
Suitelets and beforeLoad user events |
Get a Sublist object from its ID. |
|||
string[] |
Suitelets and beforeLoad user events |
Gets all the sublist IDs in an assistant. |
||
Boolean |
Suitelets and beforeLoad user events |
Indicates whether the assistant has an error message to display. |
||
Boolean |
Suitelets and beforeLoad user events |
Indicates the status of the assistant. If set to true, the assistant is finished. |
||
void |
Suitelets and beforeLoad user events |
Manages redirects in an assistant. |
||
void |
Suitelets and beforeLoad user events |
Define a splash message. |
||
void |
Suitelets and beforeLoad user events |
Sets the default values of an array of fields that are specific to the assistant. |
||
Property |
number |
Suitelets and beforeLoad user events |
The File Cabinet ID of client script file to be used in this assistant. |
|
string |
Suitelets and beforeLoad user events |
The relative path to the client script file to be used in this assistant. |
||
serverWidget.AssistantStep (read-only) |
Suitelets and beforeLoad user events |
The current step. |
||
string |
Suitelets and beforeLoad user events |
The error message text. |
||
string |
Suitelets and beforeLoad user events |
The text displayed after an assistant is finished. |
||
Boolean |
Suitelets and beforeLoad user events |
Whether the Add to Shortcuts Link is displayed in the UI. |
||
Boolean |
Suitelets and beforeLoad user events |
Whether the current and total step numbers are displayed in the UI. |
||
Boolean |
Suitelets and beforeLoad user events |
Whether assistant steps are ordered or unordered. |
||
string |
Suitelets and beforeLoad user events |
The title of the assistant. |
AssistantStep Object Members
The following members are called on the serverWidget.AssistantStep object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
string[] |
Suitelets and beforeLoad user events |
Gets all the field IDs in an assistant step. |
|
number |
Suitelets and beforeLoad user events |
Gets the number of lines previously entered by a user in a step. |
||
string[] |
Suitelets and beforeLoad user events |
Gets all the field IDs in a list. |
||
string |
Suitelets and beforeLoad user events |
Gets the current value of a sublist field (line item) in a step. |
||
string[] |
Suitelets and beforeLoad user events |
Gets the IDs for all the sublist fields (line items) in a step. |
||
string | string[] |
Suitelets and beforeLoad user events |
Gets the current value of a field. |
||
Property |
string |
Suitelets and beforeLoad user events |
The help text for a step. |
|
string (read-only) |
Suitelets and beforeLoad user events |
The internal ID of the step. |
||
string |
Suitelets and beforeLoad user events |
The label for a step. |
||
number |
Suitelets and beforeLoad user events |
Indicates where this step appears sequentially in an assistant. |
Button Object Members
The following members are called on the serverWidget.Button object.
Member Type |
Name |
Property Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Boolean |
Suitelets and beforeLoad user events |
Whether a button is grayed-out and disabled. |
|
Boolean |
Suitelets and beforeLoad user events |
Whether the button is hidden in the UI. |
||
string |
Suitelets and beforeLoad user events |
The label for the button. |
Field Object Members
The following members are called on the serverWidget.Field object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
void |
Suitelets and beforeLoad user events |
Adds a select option to a dropdown list for a selectable field. |
|
Object[] |
Suitelets and beforeLoad user events |
Returns the internal ID and label of the options for a select field as name/value pairs. |
||
Suitelets and beforeLoad user events |
Sets the help text that appears in the field help popup. |
|||
Suitelets and beforeLoad user events |
Updates the break type used to add a break in flow layout for the field. |
|||
Suitelets and beforeLoad user events |
Updates the height and width for the field. |
|||
Suitelets and beforeLoad user events |
Updates the type of display for the field. |
|||
Suitelets and beforeLoad user events |
Updates the layout type for the field. |
|||
Property |
string |
Suitelets and beforeLoad user events |
The alias used to set the field value. |
|
string |
Suitelets and beforeLoad user events |
The default value for the field. |
||
string (read-only) |
Suitelets and beforeLoad user events |
The help text for the field. |
||
string (read-only) |
Suitelets and beforeLoad user events |
The internal ID for the field. |
||
Boolean |
Suitelets and beforeLoad user events |
Whether the field is required. |
||
string |
Suitelets and beforeLoad user events |
The label for the field. |
||
string |
Suitelets and beforeLoad user events |
The text displayed for a link in place of the URL. |
||
number |
Suitelets and beforeLoad user events |
The maximum length, in characters, for the field. |
||
number |
Suitelets and beforeLoad user events |
The number of empty vertical character spaces above the field. |
||
number |
Suitelets and beforeLoad user events |
The height of a rich text field, in pixels. |
||
number |
Suitelets and beforeLoad user events |
The width of a rich text field, in pixels. |
||
string (read-only) |
Suitelets and beforeLoad user events |
The type of field. |
FieldGroup Object Members
The following members are called on the serverWidget.FieldGroup object.
Member Type |
Name |
Property Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Boolean |
Suitelets and beforeLoad user events |
Whether a border appears around the field group. |
|
Boolean |
Suitelets and beforeLoad user events |
Whether the field group is collapsible. |
||
Boolean |
Suitelets and beforeLoad user events |
Whether the field group is initially collapsed or expanded in the default view. |
||
Boolean |
Suitelets and beforeLoad user events |
Whether the field group is displayed in a single column. |
||
string |
Suitelets and beforeLoad user events |
The label for the field group. |
Form Object Members
The following members are called on the serverWidget.Form object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Suitelets and beforeLoad user events |
Adds a button to the form. |
||
Suitelets and beforeLoad user events |
Adds a field that store credentials in NetSuite for invoking services provided by third parties. |
|||
Suitelets and beforeLoad user events |
Adds a field to the form. |
|||
Suitelets and beforeLoad user events |
Adds a group of fields to the form. |
|||
void |
Suitelets and beforeLoad user events |
Shows a message on a form in view mode. You can use this method to show a message on a form based on its user event script context. |
||
void |
Suitelets and beforeLoad user events |
Adds a link to a form. |
||
Suitelets and beforeLoad user events |
Adds a Reset button to a form that clears the values of all fields. |
|||
Suitelets and beforeLoad user events |
Add a secret key field to the form. |
|||
Suitelets and beforeLoad user events |
Adds a sublist to the form. |
|||
Suitelets and beforeLoad user events |
Adds a submit button to a form that saves user inputs. |
|||
Suitelets and beforeLoad user events |
Adds a subtab to a form. |
|||
Suitelets and beforeLoad user events |
Adds a tab to a form. |
|||
Suitelets and beforeLoad user events |
Returns a button by internal ID. |
|||
Suitelets and beforeLoad user events |
Returns a field by internal ID. |
|||
Suitelets and beforeLoad user events |
Returns a sublist by internal ID. |
|||
Suitelets and beforeLoad user events |
Returns a subtab by internal ID. |
|||
Suitelets and beforeLoad user events |
Returns a tab object from its internal ID. |
|||
Suitelets and beforeLoad user events |
Returns an array of all the tabs in a form. |
|||
void |
Suitelets and beforeLoad user events |
Inserts a field before another field within a form. |
||
void |
Suitelets and beforeLoad user events |
Inserts a sublist before another sublist on a form. |
||
void |
Suitelets and beforeLoad user events |
Inserts a subtab before another subtab on a form. |
||
void |
Suitelets and beforeLoad user events |
Inserts a tab before another tab on a form. |
||
void |
Suitelets and beforeLoad user events |
Removes a button from a form. |
||
void |
Suitelets and beforeLoad user events |
Sets the default values of many fields on a form. |
||
Property |
number |
Suitelets and beforeLoad user events |
The File Cabinet ID of client script file to be used in this form. |
|
string |
Suitelets and beforeLoad user events |
The relative path to the client script file to be used in this form. |
||
string |
Suitelets and beforeLoad user events |
The title used for the form. |
List Object Members
The following members are called on the serverWidget.List object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Suitelets and beforeLoad user events |
Adds a button to a list. |
||
Suitelets and beforeLoad user events |
Adds a column to a list. |
|||
Suitelets and beforeLoad user events |
Adds a column containing Edit or Edit/View links to a Suitelet or Portlet list. |
|||
Suitelets and beforeLoad user events |
Adds a link to a list. |
|||
Suitelets and beforeLoad user events |
Adds a single row to a list. |
|||
Suitelets and beforeLoad user events |
Adds multiple rows to a list. |
|||
Property |
number |
Suitelets and beforeLoad user events |
The File Cabinet ID of client script file to be used in this list. |
|
string |
Suitelets and beforeLoad user events |
The relative path to the client script file to be used in this list. |
||
string |
Suitelets and beforeLoad user events |
The display style for this list. |
||
string |
Suitelets and beforeLoad user events |
The List title. |
ListColumn Object Members
The following members are called on the serverWidget.ListColumn object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Suitelets and beforeLoad user events |
Adds a URL parameter (optionally defined per row) to the list column's URL. |
||
Suitelets and beforeLoad user events |
Sets the base URL for the list column. |
|||
Property |
string |
Suitelets and beforeLoad user events |
The label of this list column. |
Sublist Object Members
The following members are called on the serverWidget.Sublist object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
Suitelets and beforeLoad user events |
Adds a button to a sublist. |
||
Suitelets and beforeLoad user events |
Add a field to a sublist. |
|||
Suitelets and beforeLoad user events |
Adds a Mark All or Unmark All button. |
|||
Suitelets and beforeLoad user events |
Adds a Reset button. |
|||
Suitelets and beforeLoad user events |
Returns a Field object on a specified sublist. |
|||
string |
Suitelets and beforeLoad user events |
Gets a field value on a sublist. |
||
void |
Suitelets and beforeLoad user events |
Sets the value of a sublist field. |
||
Suitelets and beforeLoad user events |
Updates the ID of a field designated as a totalling column, which is used to calculate and display a running total for the sublist. |
|||
Suitelets and beforeLoad user events |
Updates a field ID that is to have unique values across the rows in the sublist. |
|||
Property |
string |
Suitelets and beforeLoad user events |
The display style for a sublist. |
|
string |
Suitelets and beforeLoad user events |
The inline help text for a sublist. |
||
string |
Suitelets and beforeLoad user events |
The label for a sublist. |
||
number (read-only) |
Suitelets and beforeLoad user events |
The number of line items in a sublist. |
Tab Object Members
The following members are called on the serverWidget.Tab object.
Member Type |
Name |
Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string |
Suitelets and beforeLoad user events |
The inline help text for a tab or subtab. |
|
string |
Suitelets and beforeLoad user events |
The label for a tab or subtab. |
N/ui/serverWidget Module Script Samples
The following script samples demonstrate how to use the features of the N/ui/serverWidget module:
See Complete Custom List Page Sample Script for a sample of a List page, and Sample Custom Assistant Script for a sample of an Assistant.
Create a Custom Form with a Submit Button, Fields, and an Inline Editor Sublist
The following sample creates a Suitelet that generates a sample form with a submit button, fields, and an inline editor sublist.
This script sample uses the define
function, which is required for an entry point script (a script you attach to a script record and deploy). You must use the require
function if you want to copy the script into the SuiteScript Debugger and test it. For more information, see SuiteScript 2.x Global Objects.
This sample uses SuiteScript 2.1. For more information, see SuiteScript 2.1.
/**
* @NApiVersion 2.1
* @NScriptType Suitelet
*/
define(['N/ui/serverWidget'], (serverWidget) => {
const onRequest = (scriptContext) => {
if (scriptContext.request.method === 'GET') {
let form = serverWidget.createForm({
title: 'Simple Form'
});
let field = form.addField({
id: 'textfield',
type: serverWidget.FieldType.TEXT,
label: 'Text'
});
field.layoutType = serverWidget.FieldLayoutType.NORMAL;
field.updateBreakType({
breakType: serverWidget.FieldBreakType.STARTCOL
});
form.addField({
id: 'datefield',
type: serverWidget.FieldType.DATE,
label: 'Date'
});
form.addField({
id: 'currencyfield',
type: serverWidget.FieldType.CURRENCY,
label: 'Currency'
});
let select = form.addField({
id: 'selectfield',
type: serverWidget.FieldType.SELECT,
label: 'Select'
});
select.addSelectOption({
value: 'a',
text: 'Albert'
});
select.addSelectOption({
value: 'b',
text: 'Baron'
});
let sublist = form.addSublist({
id: 'sublist',
type: serverWidget.SublistType.INLINEEDITOR,
label: 'Inline Editor Sublist'
});
sublist.addField({
id: 'sublist1',
type: serverWidget.FieldType.DATE,
label: 'Date'
});
sublist.addField({
id: 'sublist2',
type: serverWidget.FieldType.TEXT,
label: 'Text'
});
form.addSubmitButton({
label: 'Submit Button'
});
scriptContext.response.writePage(form);
} else {
const delimiter = /\u0001/;
const textField = scriptContext.request.parameters.textfield;
const dateField = scriptContext.request.parameters.datefield;
const currencyField = scriptContext.request.parameters.currencyfield;
const selectField = scriptContext.request.parameters.selectfield;
const sublistData = scriptContext.request.parameters.sublistdata.split(delimiter);
const sublistField1 = sublistData[0];
const sublistField2 = sublistData[1];
scriptContext.response.write(`You have entered: ${textField} ${dateField} ${currencyField} ${selectField} ${sublistField1} ${sublistField2}`);
}
}
return {onRequest}
});
Create a Custom Survey Form
The following sample creates a Suitelet that generates a customer survey form with inline HTML fields, radio fields, and a submit button.
This script sample uses the define
function, which is required for an entry point script (a script you attach to a script record and deploy). You must use the require
function if you want to copy the script into the SuiteScript Debugger and test it. For more information, see SuiteScript 2.x Global Objects.
/**
* @NApiVersion 2.x
* @NScriptType Suitelet
*/
define(['N/ui/serverWidget'], function(serverWidget) {
function onRequest(context) {
var form = serverWidget.createForm({
title: 'Thank you for your interest in Wolfe Electronics',
hideNavBar: true
});
var htmlHeader = form.addField({
id: 'custpage_header',
type: serverWidget.FieldType.INLINEHTML,
label: ' '
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.OUTSIDEABOVE
}).updateBreakType({
breakType: serverWidget.FieldBreakType.STARTROW
}).defaultValue = '<p style=\'font-size:20px\'>We pride ourselves on providing the best' +
' services and customer satisfaction. Please take a moment to fill out our survey.</p><br><br>';
var htmlInstruct = form.addField({
id: 'custpage_p1',
type: serverWidget.FieldType.INLINEHTML,
label: ' '
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.OUTSIDEABOVE
}).updateBreakType({
breakType: serverWidget.FieldBreakType.STARTROW
}).defaultValue = '<p style=\'font-size:14px\'>When answering questions on a scale of 1 to 10,' +
' 1 = Greatly Unsatisfied and 10 = Greatly Satisfied.</p><br><br>';
var productRating = form.addField({
id: 'custpage_lblproductrating',
type: serverWidget.FieldType.INLINEHTML,
label: ' '
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.NORMAL
}).updateBreakType({
breakType: serverWidget.FieldBreakType.STARTROW
}).defaultValue = '<p style=\'font-size:14px\'>How would you rate your satisfaction with our products?</p>';
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '1',
source: 'p1'
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.STARTROW
});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '2',
source: 'p2'
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.MIDROW
});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '3',
source: 'p3'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '4',
source: 'p4'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '5',
source: 'p5'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '6',
source: 'p6'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '7',
source: 'p7'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '8',
source: 'p8'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '9',
source: 'p9'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoproductrating',
type: serverWidget.FieldType.RADIO,
label: '10',
source: 'p10'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.ENDROW});
var serviceRating = form.addField({
id: 'custpage_lblservicerating',
type: serverWidget.FieldType.INLINEHTML,
label: ' '
}).updateLayoutType({
layoutType: serverWidget.FieldLayoutType.NORMAL
}).updateBreakType({
breakType: serverWidget.FieldBreakType.STARTROW
}).defaultValue = '<p style=\'font-size:14px\'>How would you rate your satisfaction with our services?</p>';
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '1',
source: 'p1'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.STARTROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '2',
source: 'p2'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '3',
source: 'p3'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '4',
source: 'p4'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '5',
source: 'p5'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '6',
source: 'p6'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '7',
source: 'p7'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '8',
source: 'p8'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '9',
source: 'p9'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.MIDROW});
form.addField({
id: 'custpage_rdoservicerating',
type: serverWidget.FieldType.RADIO,
label: '10',
source: 'p10'
}).updateLayoutType({layoutType: serverWidget.FieldLayoutType.ENDROW});
form.addSubmitButton({
label: 'Submit'
});
context.response.writePage(form);
}
return {
onRequest: onRequest
};
});