Portlet.setSubmitButton(options)

Method Description

Adds a submit button to the form.

Returns

serverWidget.Button

Entry Point

render(params)

Since

2016.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.url

string

required

The URL that the form posts data to.

2016.2

options.label

string

optional

The button label.

2016.2

options.target

string

optional

The target attribute of the form element, if it is different from the portlet’s own embedded iframe. Supported values include standard HTML target attributes such as _top, _parent, and _blank. It can also be set to frame names and the NetSuite-specific identifier _hidden.

Setting this value to _hidden allows submission to a backend that returns results to a hidden child iframe within the portlet’s embedded iframe.

2016.2

Syntax

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see SuiteScript 2.x Portlet Script Type.

          ...
params.portlet.setSubmitButton({ url: 'http://httpbin.org/post', label: 'Submit', target: '_top'
});
... 

        

Related Topics

Portlet Object
Portlet.addColumn(options)
Portlet.addEditColumn(options)
Portlet.addField(options)
Portlet.addLine(options)
Portlet.addRow(options)
Portlet.addRows(options)
Portlet.clientScriptFileId
Portlet.clientScriptModulePath
Portlet.html
Portlet.title

General Notices