You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Use the <remform> tag to add a form consisting of model attributes to the portal.

Placing more than one widget instance with the <remform> tag on a page is not recommended. Unlike the <rem> tag, <remform> is used only for creating a single record at a time.

Available attributes:

AttributeTypeMandatoryDescription
isPortalBooleanN

Set the attribute to true to give the tag portal behavior and rendering.

isUserScriptsBooleanNTo disable the client scripts execution, set the false value. The default value is true.
modelIdStringNSpecify the ID of the RE model.
nameStringN

This attribute stores the form name.

Define the form name in the Template field:

Template example
<remform tableName="itsm_incident" name="incidentForm"></remform>

Then, call it in the widget client script:

Client script example
const builtInForm = s_widgets.getForm('incidentForm');
await builtInForm.save();
recordIdStringNSpecify the ID of an existing record to extend.
saveButtonCaptionStringNSpecify the text displayed on the Save button.
styleStringN

Specify the display settings (size, font, color, and others) of the tag elements using the CSS syntax.

tableNameStringYSpecify the name of the table for which the extended record model was created.

Examples:

remform
<remform modelId="{data.model_id}" isPortal="true" tableName="rem_table" saveButtonCaption="Save" />
Client script
(() => {
    window.s_widget_custom = window.s_widget_custom || {};
    const modelId = new URLSearchParams(window.location.search).get('model_id');
    s_widget.setFieldValue('model_id', modelId); // Provide form of new record with model id
})();


  • No labels