Skip to main content
Version: 1.22.3

rem

Use the <rem> tag to add model attributes of an extended record to a form. The use case is when the administrator needs to extend a record form in the agent interface. The tag must be specified in the Template field of the widget.

caution

If on the page with a record form for one table there is an RE model for a record of another table, which is added to the form using a widget with the SimpleTag <rem>, the REM client script will not be able to access the form directly through the s_form variable. In this case, there are two independent form objects on the page.

To operate the form in both cases described above, use the construction s_widgets.getForm('formName'), where formName is the name of the required form view.

Available attributes:

AttributeTypeMandatoryDescription
isPortalBooleanNSet 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 scripts execution. The default value is true.
modelIdStringNSpecify the ID of the RE model.
recordIdStringNSpecify the ID of an existing record to extend.
styleStringNSpecify the display settings (size, font, color, and others) of the tag elements using the CSS syntax.
If the attribute is not configured, the fields added with the <rem> tag look the same as the form fields.
tableNameStringYSpecify the name of the table to which this tag is bound.

Example:

rem
<rem 
modelId="{data.model_id}"
tableName="{data.table_name}"
recordId ="{data.record_id}"
></rem>
Client script
(() => {
window.s_widget_custom = window.s_widget_custom || {};
const parameter = new URLSearchParams(window.location.search).get('model_id');
s_widget.setFieldValue('model_id', parameter);
s_widget.setFieldValue('table_name', window.s_form.getTableName());
s_widget.setFieldValue('record_id', window.s_form.getUniqueValue());
})();