Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Тэг <form> tag is a widget displaying a record form when necessary parameters (such as a table, form view, record ID) are specified. It helps to ensure user interaction with the record form, in terms of the field changes and form reaction. It also supports the functionality of widgets added to the form.

Structure

представляет собой виджет, отображающий форму записи при задании необходимых параметров (таких как таблица, вид формы, ID записи). Это помогает обеспечить взаимодействие пользователя с формой записи относительно изменения поля и реакции формы. Он также поддерживает функциональные возможности виджетов, добавленных в форму.

Структура


This widget generally has the following structure:

  1. Embedded widget containing the form elements.
  2. The header block:
    1. A header can be taken from the column with the Display by Ref attribute turned on.
  3. The section block:
    1. The Default section should be the first in the section list if there is more than one.
    2. Every widget section is relevant to the appropriate form section and has its own title. 
    3. This block is mandatory.
  4. The footer block containing UI actions (buttons and others).
Elements 

Элементы 


Form widget elements, like form elements, can be of different types. All field types functionality used in forms is supported in the widgets (such as properties, behavior, scalar type, and so on).

  • If a widget element displays date and time, it is displays them in the user timezone.
  • The widget elements containing multilanguage fields and use the Translated Text field type (such as table and column titles, choice options) display the values in the current user locale.

Attributes

To create a dynamic form, use the following attributes:

Атрибуты


Для создания динамической формы, используйте следующие атрибуты:

Атрибут

Тип

Обязательный

Описание

Attribute

Type

Mandatory

Description

classStringNНетУкажите название класса CSS, указанного в поле CSSSpecify a CSS class name defined in the CSS field.
isPortalBooleanNНетЧтобы отобразить виджет на портале, установите значение “true”. По умолчанию установлено значение “false”To enable the tag to be displayed on the portal, set the value true. The default value is false.
nameStringNНет

Этот атрибут сожержит название формы.

Задайте название формы через поле Шаблон в шаблоне: 

This attribute stores the form name.

Define the form name within the template in the Template field:

Code Block
languagexml
titleForm name
<Form tableName="{data.table_name}" sysId="{data.record_id}" name="custom"></Form>

Then call it in the widget client scriptЗатем вызовите его через клиентский скрипт виджета:

Code Block
languagejs
themeEclipse
titleForm name
const builtInForm = s_widgets.getForm('custom');
await builtInForm.save();


tableNameStringYДаУкажите название таблицыSpecify the table name.
viewStringNНетУкажите название шаблона таблицы, например, «По умолчанию».Define a name of the table template view, for example, "Default"
saveStringNНет

Добавьте на форму кнопку сохранения, добавив на нее необходимый текст (см. пример ниже)

Используйте  этот атрибут, когда по каким-либо причинам невозможно использовать UI-действия (значение атрибута uiActions  "false"

Add a Save button on the form with the customized text (see the code example below).

It makes sense to use this attribute when it is impossible to use the UI actions due to any reasons (the uiActions attribute is equal to false).

titleHideBooleanNНетПри установленном по умолчанию значении "true" заголовок формы скрытHide the title of the form. The default value is true
uiActionsBooleanNНетУстановите значение "true", чтобы сделать возможным использование UI-действий. В противном случае их использование будет запрещено (кроме кнопки Сохранить, определенной атрибутом saveSet this attribute value to true to make UI actions available to use. Otherwise, their usage is prohibited (except for the Save button specified by the save attribute).
userScriptsBooleanNНетЧтобы клиентские скрипты, указанные в поле Клиентский скрипт, были доступны для использования, установите для этого атрибута значение "true". В противном случае их использование запрещеноTo make client scripts defined in the Client Script field available to use, set this attribute value to true. Otherwise, their usage is prohibited.
sysidStringNНет

Specify theУкажите ID of the table record записи таблицы.

Info

The table should be specified first via the tableName attributeСначала укажите таблицу через параметр tableName.


Note

Do not specify the sysid parameter for a newly created form that did not exist before.

Form example

Не указывайте параметр sysid для только что созданных форм, которые не существовали ранее.


Пример формы


Code Block
languagexml
themeEclipse
titleForm example
<Form tableName="user" sysid="158747771611397284" view="Profile" save="CustomНовая saveкнопка buttonсохранения" uiActions="true" userScripts="true"></Form>


Table of Contents
absoluteUrltrue
printablefalse