Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Merged branch "DOC0000070" into parent

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 value to true to enable the tag to be displayed on the portal. The default value is false.

isUserScriptsBooleanNSet the value to false to disable the client script execution. 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:

Code Block
languagexml
themeEclipse
titleTemplate example
<remform tableName="itsm_incident" name="incidentForm"></remform>

Then, call it in the widget client script:

Code Block
languagejs
themeEclipse
titleClient 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:

Code Block
languagexml
themeEclipse
titleremform
<remform<div modelIdsimple-if="{data.model_id}isShow}">
    <remform name="requestForm" isPortal="false" modelId="true{data.modelId}" tableName="rem_table{data.tableName}" saveButtonCaptionrecordId="Save{data.recordId}" />
Code Block
languagejs
titleClient script
linenumberstrue
(() => {
    <checkbox model="data.copyCaller" label="{data.questionText}"></checkbox>
    window.s_widget_custom = <div class="reclassification-rem-model-widget__buttons">
        <button buttonType="secondary" event-click="window.s_widget_custom || {};
.cancel()">{data.buttonCancel}</button>
       const modelId<button buttonType= new URLSearchParams(window.location.search).get('model_id');
    s_widget.setFieldValue('model_id', modelId); // Provide form of new record with model id
})();"primary" event-click="window.s_widget_custom.create()">{data.buttonCreate}</button>
    </div>
</div>

The template above adds the following form to the page:

Image Added