Kentico CMS 7.0 Context Help

Fields tab

Fields tab

Previous topic Next topic Mail us feedback on this topic!  

Fields tab

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

On this tab, you can define the fields that will be used in the form. The following actions are available:

 

Move up (Up) - moves the selected field up, which also changes its position in the form.

Move down (Down) - moves the field down.

New category (NewCategory) - creates a new category for fields. Fields belonging to a category are grouped together and displayed under a header in the form. Each category will contain the fields defined below it.

New attribute (AddWebPart) - adds a new field.

Delete item (Delete) - deletes the currently selected field or category.

 

When editing the properties of a field, you can switch between either simple or advanced mode using the appropriate button at the top of the dialog. In advanced mode, the full configuration options of the field editor are available. Simple mode offers a more straightforward editing dialog and is recommended for non‑technical users.

 

Simple mode

 

Column name

Sets an identifier for the field. This name is also used for the database column storing the values of the field in the form's database table.

Show on public form

Unless this is checked, the field will only be displayed when editing the form's records in CMS Desk. It will not be included in the form on the live site.

 

Fields with this option disabled can be useful for storing internal values.

Field caption

Sets the text displayed next to the field.

Field type

This selection determines how users will be able to interact with the field in the form.

 

The options offered here include all form controls that are allowed to be shown in forms and have their High priority flag enabled.

Maximum length

Sets the maximum number of characters that can be entered into the field.

Allow empty value

If enabled, the field allows empty values.

 

If disabled, users cannot save the form unless there is a value entered in the given field. In this case, the field is required and an asterisk (*) is displayed next to it.

Default value

Default value of the field that will be pre-filled when the form is displayed.

 

The options available under the Editing control settings section are used to perform additional configuration of the field's appearance or behavior, depending on the selected Field type. Please see the tooltips of individual settings for more information.

 

Advanced mode

 

Please note: Not all options may be available depending on the selected Attribute type.

 

Database

Column name

Sets an identifier for the field. This name is also used for the database column storing the values of the field in the form's database table.

Attribute type

Type of value that the field should contain.

Attribute size

Sets the maximum number of characters that can be entered into the field. Only available if the Attribute type is set to Text.

Allow empty value

If enabled, the field allows empty values.

 

If disabled, users cannot save the form unless there is a value entered in the given field. In this case, the field is required and an asterisk (*) is displayed next to it.

Default value

Default value of the field that will be pre-filled when the form is displayed.

Translate field

Indicates if the field should be included when using translation services for the form's records .

 

Only available if the selected Attribute type is Text, Long text or File.

Display attribute in the editing form

Indicates if the field should be available when the form is edited.

Field appearance

Shown on public form

Unless this is checked, the field will only be displayed when editing the form's records in CMS Desk. It will not be included in the form on the live site.

 

Fields with this option disabled can be useful for storing internal values.

Field caption

Sets the text displayed next to the field.

Form control

Selects the form control that should be used in the form to interact with the given field.

 

If the form control that you need is not available in the drop-down list, you should be able to assign it through the dialog opened via the (more items ...) option.

Field description

Tooltip which will be displayed if a user hovers over the field.

Editing control settings

The settings in this section are used to perform additional configuration of the selected Form control, which affects the behavior or appearance of the field. The available options depend on the parameters defined for the given form control. Please see the tooltips of individual settings for more information.

 

This section also has two available modes. You can switch between Advanced and Simplified mode using the link on the side of the section. In simplified mode, only a limited set of parameters is offered (typically the most important ones).

Validation

Regular expression

This regular expression will be used by the validator of the field. Only available if the selected Attribute type is Text or Long text.

Min/Max length

Sets the minimum/maximum length for entered values. Only available if the selected Attribute type is Text or Long text.

Min/Max value

Sets the minimum/maximum value that can be entered. Only available if the selected Attribute type is numerical.

From/To

Can be used to specify a time interval into which the entered value must belong. Only available if the selected Attribute type is Date and time.

Error message

Error message displayed if a user enters invalid input into the field and attempts to save the form.

CSS styles

Caption style

Used to set CSS styles for the caption of the given field.

Input style

Used to set CSS styles for the input entered into the field.

Control CSS class

Name of the CSS class used to style the field.

Field advanced settings

Visible condition

May be used to enter a macro condition that must be fulfilled in order for the specific field to be visible in the form.

 

You can write any condition according to your specific requirements. For details about available macro options and syntax, please refer to the Development -> Macro expressions chapter of the Developer's Guide.

 

If you wish to create a condition that depends on the state of the other fields in the form, you can access them in the macro expression using the corresponding Column name. The data of the fields may then be retrieved through the following properties:

 

Value - returns the current value of the field. For example, FirstName.Value is resolved into the value entered into the FirstName field.

Visible - returns a true value if the given field is currently visible in the form.

Enabled - true if the field is currently enabled, i.e. its value can be edited.

Info.<field setting> - may be used to access various settings configured for the field, for example: FirstName.Info.AllowEmpty

Enabled condition

Allows you to enter a macro condition that determines when the field should be enabled. If this condition is resolved as false, the field will be visible, but it will not be possible to edit its value.

 

You can use the same macro options as described above for the Visible condition property.

Has depending fields

If enabled, the form will be refreshed via autopostback whenever the value of the given field is changed. This means that other fields can be dynamically updated according to the current value of the field.

 

Please note that the actual logic of the dependencies needs to be implemented in the code of the used form controls.

Depends on another field

This option must be enabled if you wish to have the behavior of the field dynamically changed according to the value of some other field.

 

The following properties are available when creating or editing categories:

 

Category

Category name

Sets the name of the category that is displayed in the form.

Collapsible

If enabled, users will be able to collapse and expand the content of the category.

Collapsed by default

If enabled, the category will initially be collapsed when the form is loaded.

Visible

Indicates if the category and all of the fields under it should be visible in the form.

Visible condition

May be used to enter a macro condition that must be fulfilled in order for the category to be visible. You can use the same macro options as described above for the Visible condition property of fields.

 

Any changes made to the settings of a field or category must be confirmed by clicking the Save Save button at the top.

 

Detailed information about the Forms module can be found in Developer's Guide -> Modules -> Forms. Please refer to Developer's Guide -> Development -> Form controls to learn more about form fields and their configuration.