Kentico CMS 7.0 Context Help

Properties tab

Properties tab

Previous topic Next topic Mail us feedback on this topic!  

Properties tab

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

This tab is used to define parameters for the currently edited form control. The values of these parameters can be set when the control is added to a form in the field editor, which allows it to be configured to best fit the specific situation. This also means that a control can be reused for fields that require slightly different functionality or design.

 

The following actions are possible:

 

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

Move down (Down) - moves the parameter down.

New category (NewCategory) - creates a new category for parameters. Categories are displayed as sub-headings in the Editing control settings section of the field editor. A category will contain all parameters defined below it.

New attribute (AddWebPart) - adds a new parameter.

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

 

The editing interface for each parameter is provided by another form control. As a result, individual parameters can be configured through a field editor as described below.

 

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

 

Database

Column name

The name that will serve as the identifier of the parameter. This name is used in the code of the form control when getting (or setting) the value of the parameter.

Attribute type

Type of value that the parameter should have.

Attribute size

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

Allow empty value

If enabled, the parameter will allow empty values. If disabled, it will not be possible to save the form control unless there is a value entered in the given parameter.

Default value

Default value of the parameter that will be pre-filled when the current form control is selected in a field editor.

Translate field

Indicates if the field should be included when using translation services for the given form control.

 

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

Display attribute in the editing form

Indicates if the parameter should be available in the Editing control settings section for fields that use the current form control.

Field appearance

Field caption

Sets the text displayed next to the parameter's editing field.

Form control

Selects the form control that should be used to set the value of the parameter.

 

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 parameter's 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 parameter's editing field. The available options depend on the parameters defined for the given form control. Please see the tooltips of individual parameters for more information.

 

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 parameter's 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 parameter.

CSS styles

Caption style

Used to set CSS styles for the caption of the parameter's field.

Input style

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

Control CSS class

Name of the CSS class used to style the parameter's field.

Field advanced settings

Visible condition

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

 

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 form control's other parameters, you can access them in the macro expression using the corresponding Column name. The data of the parameters may then be retrieved through the following properties:

 

Value - returns the current value of the parameter. For example, WatermarkText.Value is resolved into the value of the WatermarkText parameter.

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

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

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

Enabled condition

Allows you to enter a macro condition that determines when the parameter should be enabled. If this condition is resolved as false, the parameter 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 field.

Display in simple mode

Indicates whether the parameter should also be displayed when the Editing control settings of the form control are switched to simplified mode in the field editor. Enabling this also makes the parameter visible when defining fields in the simple mode provided by the Forms module.

 

To keep the simple mode as straightforward as possible, it is recommended to enable this setting only for important or frequently used parameters.

Has depending fields

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

 

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 parameter dynamically changed according to the value of some other parameter.

 

The following properties are available when creating or editing categories:

 

Category

Category name

Sets the name of the category that is displayed in the field editor.

Collapsible

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

Collapsed by default

If enabled, the category will initially be collapsed when it is loaded in the field editor.

Visible

Indicates if the category and all of the parameters under it should be visible in the field editor.

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 field of parameters.

 

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

 

More resources can be found in:

 

Developer's Guide -> Development -> Form controls

Developer's Guide -> Development -> Form controls -> Form control parameters

Developer's Guide -> Development -> Form controls -> Developing form controls