Template Attributes

 

  1. If you want to modify document template attributes, click on the Development section in the main menu and navigate to your document template. Unfold your document template and click Template Attributes. The Template Attributes dialog appears.
     

  2. In the left pane, titled Select Attribute, you can find all custom attributes defined for your document template. Using the arrows, you can move the selected attribute up and down which will change its order in the editing form.

 

The attributes are actually columns of the custom table that stores data of your document template.

 

Adding a New Attribute

 

To create a new attribute, click on the green plus button. The new attribute appears in the right pane. Enter attribute parameters and click OK to save it.

 

Editing an Existing Attribute

 

Simply click on the attribute in the left listing and it will appear in the right pane. Now you can modify its parameters and save it by clicking OK.

 

Deleting an Existing Attribute

 

To delete a new attribute, click on the red button with white cross and confirm deletion. Please note that you will also delete all data stored in this attribute and you won't be able to undo this operation!

 

Attribute Settings

Parameter

Compulsory

Description

Attribute Name

Yes

Unique name of the attribute. The name cannot contain spaces and it cannot contain the following characters:

.,;'`:/\*|?""&%$!-+=()[]{}

Attribute name is the name of the column in the custom database table of your document template.

 

Attribute Type

Yes

Attribute type is the data type of the column in the database table. You can choose one of the following types:

 

  • Text - text of limited size (you need to provide  the maximum length in the Attribute Size field). It's represented as nvarchar database table column. Maximum size is 4500 UNICODE characters.

  • Long Text - text of unlimited size. It's represented as ntext database table column. Use this type to store large text and formatted text, such as article text, product description, etc. Please note that you cannot sort and filter by columns of this type!

  • Integer Number - integer number (positive or negative). It's represented by int type in the database table.

  • Decimal Number (Double Precission) - decimal number (positive or negative). It's represented by float type in the database table.

  • Date and Time - date and time. It's represented by the datetime type in the database table.

  • Boolean (Yes/No) - boolean value. It can be true or false. It's represented as bit type in the database table.

 

Please note: You can change the type later but if the data conversion to the new type is not possible, you will get an error message..

Attribute Size

Applicable to and compulsory only for attributes of text type.

Attribute size is the maximum size of the text fields (of text type). You can use value between 1 and 4500.

Allow Empty Value

No

Check this box to allow empty values. If you uncheck this box, the users will always have to enter or choose some value other. In the database table of your document template, the "Allow Empty Value" property is the same as "Allow NULL".

Default Value

No

You can specify a default value. If used, the form field is automatically pre-filled with specified value.

Display Attribute in the Editing Form

No

Check this box if you want to allow users to edit this attribute in the editing form. If you check this box, the field options section is enabled and you can modify form field parameters (see below).

 

 

Field Settings

Field settings influence how the attribute is displayed in the editing form:

 

Parameter

Compulsory

Description

Field Caption

Yes

Name of the field in the editing form. It cannot be empty.

 

Field Type

Yes

Indicates how the field will be displayed. According to the attribute type, you can choose one of the following types:

 

  • Label - read-only label displaying the value.

  • Text Box - one-line text box without formatting.

  • Text Area - multi-line text box without formatting. You can specify the number of columns and rows of the box.

  • HTML Area - formatted text with WYSIWYG editing. You can specify the width and the height of the editor in pixels.

  • Drop-down List - list of possible choices. Each list item has some value and text. You can specify the values either manually by writing a value;text couple on each line or you can enter a SQL query that reads data from the database. In you use the query, it must return two columns - the first one contains the value and the second one contains text of the list item.

  • Calendar - date-time picker control that allows user to choose date and time. You can allow users to edit both date and time by checking the Edit time box.

  • Check Box - check box control that can be used for boolean (yes/no) attributes.

  • Image Selection - image picker control that allows users to choose (or upload and choose) a file using the built-in file manager. You can use this control only with text attributes and you should use a text attribute of appropriate maximum size (typically 450 characters).

  • File Selection - similar to image picker, but it does not display image preview.

  • User Control (ascx) - this type of field allows you to use your own predefined user controls in the editing form. Enter user control name including its extension (ascx). You can find more details on creating your own user controls in the Developer's Guide -> Custom Document Templates ->  Creating Custom User Controls.

 

Field Description

No

Optional description of the field. The user will be able to see the description in the editing form when he/she moves the mouse over the field name.