Ektron CMS400.Net Reference

>>Managing Content > Smart Forms > Using eWebEdit400 to Create Smart Forms > Data Designer Field Types

Data Designer Field Types

To help you use all of Data Designer’s capabilities, this section explains each field type you can insert. They are very flexible and can accommodate all of your needs when designing a data entry screen.

Group Box

A Group Box field lets you group related fields together by surrounding them with a box and optionally placing a caption above them. After you insert a Group Box field, to insert other kinds of fields within the box, place the cursor inside the box then select a field type button.

Note: The tabular data field type might better accommodate your needs. See Tabular Data .

The following topics explain a Group Box field in more detail.

Advantages of Grouping Fields

Dialog Box

Fields on the Group Box Dialog

Using a Tag Other Than <Root>

Relevance Tab

Advantages of Grouping Fields

Grouping fields allows a user in Data Entry mode to add another instance of a group. For example, if a screen collects information about each telephone call, the user can click Insert Below to insert a new group of fields, ready to collect information about the next call.

Another advantage of grouping fields is that you can suppress a group of irrelevant fields. For example,assume a screen includes two groups of fields that collect information about hardcover and paperback books. When adding information about a hardcover book, you can collapse the paperback book questions because they are not relevant to your task.

Use the eyeglass icon to expand or collapse fields within a group.

Fields on the Group Box Dialog

Field

Description

Descriptive Name

Enter the name of this field.

Internally, the name is used as the field’s caption.

The Name Field’s Default Value

By default, the Data Designer assigns a name made up of Field followed by the next available number. So, the first field’s default name is Field1, the second field’s default name is Field2, etc. You can change the default if you want.

Field Name

Enter the field’s element name. This defines the field in the XML.

Use

See The Use Field

Allow

See The Allow Field

Appearance

Click Show border and caption if you want to surround the fields in this group with a box. You can also create a caption to appear in the top line of the box.

Click No border if you do not want to surround the fields in this group with a box.

Caption

If desired, enter text to describe this group of fields on the data entry screen. For example:

After you insert this field onto the screen, you can use the editor's formatting capabilities to modify its size, font, color, and other attributes.

Note: The Caption field only appears on this dialog when you create the Group Box field. If you later try to edit the field, the Caption field is not on the dialog. However, you can edit Caption text within the editor.

Advanced Tab

See Advanced Tab.

Relevance

See Relevance Tab.

Using a Tag Other Than <Root>

By default, Ektron CMS400.NET surrounds your Data Design with <root> tags. If you would like to replace the <root> tags with another element name, follow these steps.

1. After creating a new Data Design screen, insert a Group Box as the first field.

2. In the Group Box Dialog’s Field Name field, enter the root text.

3. On the Group Box Dialog box, click the Advanced tab.

4. In the Root tag section of that screen, select Use this element as the Root tag and press OK.

5. Place all other screen elements within the Group Box field.

Relevance Tab

The Relevance tab allows a group of fields to appear or disappear according to the value of other fields in the configuration. It appears on both the Group Box and Tabular Data Box dialogs.

Here are some example uses.

Questions about pregnancy that appear only if the patient is female.

A list of states that appears only if the user selects United States as his country.

A list of car manufacturers. When a user chooses one, all of its models appear in a second list.

Fields that can be Used in Relevance Conditions

Only the following field types can be used in a Relevance condition.

Check box

Text

Calculated

Choices

Note: If using a Choices field, in the Appearance area of the dialog, you can only choose List Box or Drop Box. Vertical List and Horizontal List are not supported.

Applying Relevance to a Group Box Field

To apply relevance to a Group Box field, follow these steps.

1. Edit a Smart Form configuration in Data Design mode to which you want to apply Relevance.

2. If necessary, insert the field(s) on which the group box’s appearance depends.

3. Insert a Group Box field. See Also: Group Box

Note: The location of the Group Box field is independent of the location of the fields to which you will apply conditions.

4. Click the Group Box dialog’s Relevance tab (circled below).

5. The Relevance tab appears.

6. Scroll through the list of sample conditions to determine which one best fits your situation.

7. Select a field from the lower half of the screen to replace the first variable (X or Y) in the condition.

For example, if the condition is A checkbox field is checked ({X} = 'true'), click the check box field whose value must be true in order for this group to appear.

8. Click Replace {X} in Condition.

9. Notice that, in the Condition field, the variable was replaced by the selected field (see example below).

10. If the condition has another variable, repeat Steps 7 and 8.

11. Press OK.

Ektron recommends switching to Data Entry mode and testing the Relevance conditions.  

Example of Applying Relevance to a Group Box Field

Assume you want a list of states in the United States to appear only if a user selects United States from the Country field.

To accomplish this, follow these steps.

1. Create a Choices field and assign it three values:

United States

Canada

Other

See Also: Choices

2. Create a Group Box field and name it States.

3. With that Group Box field, create a new Choices field.

- Name it US States.

- In its List field, select U.S. States & Territories.

- In Allow Selection, check First item is not a valid selection

- In the Appearance field, select Drop List.

4. Place the cursor on the States Group Box field and click Group Box.

5. Click its Relevance tab.

6. Pull down the Examples list.

7. Click A field has a given value ({X} = 'value').

8. Scroll through the lower half of the screen until you see the country Choices field.

9. Click Replace '{X}' in Condition.

10. Notice that the Condition field now reads ../Country/Country = 'value'.

11. In the Condition field, replace Value with United States.

Important: The text that replaces Value must exactly match the desired value of the selected field.

12. Click OK.

Tabular Data

The Tabular data button inserts a table into which you can place other types of fields. It’s similar to a group box.

Tabular data’s main advantage over a group box is that it lets you place fields in columns (see below).

Note: Group Box describes many features that apply to tabular data. Read that section to gain a full understanding of working with tabular data.

The following topics explain a tabular data field in more detail.

Creating a Table

Editing Tabular Data

How Tabular Data Forms XML Structure

Dialog Box

Creating a Table

First you insert the table. Then, you insert an appropriate type of field into each column. As examples, in the table above, the Description field type would be plain text, while the In Stock? field type would be choices.

If you insert a field into a table and its caption appears to the left of the data entry region (see below), move the caption to the column header (see second illustration below).

To access table commands (such as add row and add column), place the cursor inside a table cell and right click the mouse.

Important: Only table cells into which you place a field are available to visitors of your Web page.

Editing Tabular Data

To edit tabular data, hover the cursor over a table border line until you see a four-headed arrow. Then, click the right mouse button and select Field Properties.

Note: You cannot reduce the number of columns by editing the Tabular Data dialog’s Columns field. To delete a column, place the cursor in the column, right click the mouse, and select Delete Column.

How Tabular Data Forms XML Structure

Tabular data creates three levels of XML tags:

inner level: each field in the table

middle level: each row in the table

outer level: the entire set of table data

To explain how this works, we’ll use the following contact list as an example.

Name

Phone

Email

John Doe

555-1212

john.doe@example.com

Mary Smith

555-8765

msmith@example.net

How XML Tags are Assigned to Field Names

When you insert a field into a table, a dialog helps you define the field type. For example, when inserting a plain text field, the Plain Text Field dialog appears. On that dialog, the value of the Phone field defines the tags that enclose that field’s contents.

To continue our example, every contact is represented in XML as:

<Name>John Doe</Name>
<Phone>555-1212</Phone>
<Email>john.doe@example.com</Email>
and
<Name>Mary Smith</Name>
<Phone>555-8765</Phone>
<Email>msmith@example.net</Email>

How XML Tags are Assigned to Table Rows

Each row of the table collects information for one contact. On the Tabular Data Box dialog, the Row Name field defines the XML tag that groups information for each contact. For example, the Row Name field value is Contact.

</AddressBook>
<contact>
<Name>John Doe</Name>
<Phone>555-1212</Phone>
<Email>john.doe@example.com</Email>
</Contact>
        
 <Contact>
<Name>John Doe</Name>
<Phone>555-1212</Phone>
<Email>john.doe@example.com</Email>
 </Contact>
Contact>
<Name>Mary Smith</Name>
<Phone>555-8765</Phone>
<Email>msmith@example.net</Email>
</Contact>
</AddressBook>
        

Fields on the Tabular Data Dialog

Field

Description

Descriptive Name

Enter the name of this table.

The Name Field’s Default Value

By default, the Data Designer assigns a name made up of Field followed by the next available number. So, the first field’s default name is Field1, the second field’s default name is Field2, etc. You can change the default if you want.

Field Name

Enter the table’s element name. This will define the table in the XML. See Also: How Tabular Data Forms XML Structure

Tool Tip Text

Enter the text that appears when a user hovers the cursor over the table’s column headers.

Use

See The Use Field

Allow

See The Allow Field

Note: If you check More than one here, you are allowing the user to insert an entirely new table, not an additional table row.

Rows

Row display name

Enter the text that appears when a user hovers the cursor over the table’s cells. Use this field to describe the kind of information to be inserted into the table’s cells.

Row name

Enter the name of the XML tag used to collect data for each entry in the table.

See Also: How Tabular Data Forms XML Structure

Minimum number

If desired, enter the minimum number of rows for this table.

If you enter a number and the data entry user tries to save the screen without inserting at least the minimum number of rows, he is informed that Element content is incomplete according to the DTD/Schema.

By default, the user is allowed to cancel or save the screen anyway. However, the system administrator determines whether or not the user can save an invalid document.

Maximum number

If desired, enter the maximum number of rows for this table. If you don’t want to assign a maximum number, check the Unlimited check box.

Result of Assigning a Maximum

When this table appears on a data entry screen, and a user adds the maximum number of rows, the Insert Above and Insert Below options are grayed out on the menu (see example below).

Columns

Enter the number of columns to appear in the table.

See Also: Editing Tabular Data

Caption

If desired, enter text to describe this table on the data entry screen. The caption appears centered above the table.

After you insert this field onto the screen, you can use eWebEditPro+XML’s formatting capabilities to modify the caption’s size, font, color, and other attributes.

Advanced Tab

See Advanced Tab

Relevance

See Relevance Tab

Checkbox

A Checkbox field is only one character wide and accepts one of two possible values: checked or unchecked. For example: 

Fields on the Checkbox Dialog

Field

Description

Descriptive Name

Enter text to guide the user’s response to this field. To continue the above example, the caption would be Check if you are over 65.

After you insert this field onto the screen, the Descriptive Name appears to the right of the checkbox. You can use the editor's formatting capabilities to modify its size, font, color, and other attributes.

Note: The Descriptive Name field only appears on this dialog when you create the Check Box field. If you later try to edit the field, it is not on the dialog. However, you can edit the Descriptive Name text within the editor.

Indexed

Check if you want to index this field. See Also: XML Indexing

The Indexed field may not appear, depending on how your administrator set up your system.

Field Name

Enter the field’s element name. This will define the field in the XML.

Tool Tip Text

Enter text that appears when a user hovers the cursor over this field (circled in red below).

Default value

If you want this field to be checked when the screen first appears, click True.

Otherwise, click False.

Validation tab

You can use this screen to specify that the checkbox must be checked or unchecked.

Advanced tab

See Advanced Tab

Text

Use a text field when you want the user to enter a text response.

Note: If a plain text field tries to perform a numerical calculation with a value that is blank or contains letters, NaN appears in the field. (NaN stands for “not a number.”) If a plain text field tries to divide by zero, Infinity appears.

Note: If a plain text field collects a URL, add on-screen instructions to prefix it with http:\\. If the user does not, the URL address is not stored properly.

The following capabilities are available with a text field.

Text can be read-only or hidden

You can only allow plain text, or let the Smart Form author format it

The text field can consist of a single or multiple lines

Fields on the Text Field Dialog

Field

Description

Descriptive Name

Enter the name of the field.

Indexed

Check if you want to index this field. For more information, see XML Indexing.

The Indexed field may or may not appear, depending on how your administrator set up your system.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over this field.

Default Value

If you want to set a default value for this field, enter that value here. The default value appears in Data Entry mode, where the user can accept, change, or delete it.

For example, if this field collects a city, and most users enter New York, enter New York as the value.

Use

See The Use Field

Allow

See The Allow Field

Allow Rich Formatting

Check this box if you want to let the Smart Form author format the text in this field. If you do not check the box, the author can only enter plain text.

Allow Multiple Lines

Check here to let this text box expand to accommodate the user’s input.

If you do not check this box, a single line input box appears on the data entry screen to accept user input.

Cannot be Changed

Check here to make this field read-only. That is, the user cannot insert data into it in Data Entry mode.

You might use this option to provide instructions for completing the screen.

Invisible

Check here to make this field hidden in Data Entry mode.

This option lets you store unseen information in an XML document. An example might be putting a version number for the data design so that XML documents can be upgraded to newer versions using an XSL transform.

Validation

Select the kind of validation to apply to this field. Your choices are:

No validation - the user’s response is not checked

Cannot be blank - the user must enter a response

Non-negative whole number or blank - the user must enter a positive whole number or no response

Non-negative whole number (required) - the user must enter a positive whole number

Decimal number or blank - must be a decimal number (for example, 12.345 or 12) or blank. A leading minus sign “-” is allowed. The decimal point must be a period (.), even in locales that normally use a comma (,).

Note: Decimal numbers include whole numbers because the decimal point is implied. That is, 12 is 12.0000.

Decimal number required - must be a decimal number (it cannot be blank) of none, one, or two decimal places.

A leading minus sign “-” is allowed. The decimal point must be period (.), even in locales that normally use a comma (,).

Percent: (0-100) required - the user must enter a whole number from 0 to 100

email address/email address required - a user name followed by an at sign (@) followed by a domain name

email address list/email address list required - several email addresses separated by a semicolon (;)

Zip code (US only) - the user’s response must consist of 5 (nnnnn) or 9 digits separated by a dash after the fifth (nnnnn-nnnn)

Social Security number (US only) - the user’s response must consist of nine digits in this pattern: nnn-nn-nnnn

Postal Code (Canada)/Postal Code (Canada) required - the user’s response must consist of six characters in the format ANA NAN, where A is an alphabetical character and N is a numeric.

Social Insurance Number (Canada)/Social Insurance Number (Canada) required - nine digits See Also: http://en.wikipedia.org/wiki/Social_Insurance_Number

Validation (continued from above)

ISBN code - 13 digit ISBN code. See Also: http://isbn-information.com/13-digit-isbn.html

ISSN code - See Also: http://www.issn.org/2-22635-What-is-an-ISSN.php

Custom - You can create custom validation.

For more information, see Custom Validation.

If you assign to this field any value other than No validation, the field is initially surrounded by red dashes in Data Entry mode. If the user’s response does not meet the validation criterion, the field remains surrounded by red dashes. The system administrator determines whether or not the user can save an invalid document.

Data Style

See The Data Style Field

Advanced

See Advanced Tab

Choices

Use the Choices field when you want to give the data entry user several options. For example, you create a Choices field named Interests that lists these options.

music

art

sports

The data entry user could check the first two and leave the third blank.

The following topics explain a tabular data field in more detail.

Flexibility of the Choices Field

Dialog Box

Using a Standard List

Creating a Custom List

Creating a Custom List in Configuration File

Creating the List

Creating a Dynamically Populated Choice List

Flexibility of the Choices Field

The following capabilities are available with a Choices field.

You can limit a user’s response to one item, or allow more than one.

You can require a response.

You can determine the list’s appearance from these choices.

List type

Example

Description

vertical

All choices appear, arranged vertically.

horizontal

All choices appear, arranged horizontally.

list box

All items appear. The default one is selected when the screen first appears, but can be changed.

drop list

Only the top item appears. To its right, a down arrow appears (circled). The user clicks the arrow to display all items and select one.

You can choose from a standard list of choices or create your own list.

See Also: Creating Your Own Predefined List

Fields on the Choices Dialog

Field

Description

Descriptive Name

Enter the name of the field.

Indexed

Check if you want to index this field. For more information, see XML Indexing

The Indexed field may or may not appear, depending on how your administrator set up your system.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over this choice list.

List

See You can choose from a standard list of choices or create your own list.

Allow selection

Click More than one to let the data entry user select more than one item on the data entry screen. Otherwise, click Only one.

For example, if you click More than one, and the choices are: music, art, sports, the user could select all three choices.

A selection is required - Check this box if the user must select at least one list item.

First item is not a valid selection - Check here if the first item on the list is not a valid value but instead text that prompts the user to respond to the field. An example of such text for a list of states is Select a state.

If you check this box and the user selects the first value on the list (most likely by default), an error message appears when he tries to save the screen.

Appearance

See You can determine the list’s appearance from these choices.

Item List

See Creating a Custom List

Value

Enter the value that is collected when the data entry user selects this item.

For example, if Interests appears in the Name field, and you want music to be collected when the data entry user selects this item and saves the page, enter music here.

Data Style

See The Data Style Field

Advanced

See Advanced Tab

Using a Standard List

To use a standard list, click the black down arrow next to the List field to see your options.

If you choose a standard list, it appears in the lower half of the screen. You cannot change its values.

Creating a Custom List

To create your own set of list options, accept the List field’s default value, Custom. Then, enter the list values using the Item List section of the screen, shown below.

To indicate an option is the default choice, check the Selected checkbox.

In the Display Text field, enter text to describe this item on the data entry screen. After you insert this field onto the screen, you can format it. For example, you can apply bold, assign a style, etc.

In the Value field, enter the value that is collected when the data entry user selects this item.

For example, if Interests appears in the Name field, and you want music to be collected when the data entry user selects this item and saves the page, enter music here.

To add a new choice, delete an existing choice, or move a choice up or down within the list, click the menu icon () to the left of that choice. The select a menu option.

Creating Your Own Predefined List

An administrator can create a predefined list of options to appear when a user is inserting a Choices Field.

Creating a Custom List in Configuration File

Although a user can create a custom list of choices via the Item List area of the Choices Field dialog, that list is only available in that field of that screen. If the user wants to insert the same list in another section of the screen or a different screen, he must re-enter all options.

However, if you create a list according to the steps below, your custom list is stored in the configuration file (along with the standard choice lists, such as Countries). As a result, any user connected to your server can insert the list into any Choices Field on any screen.

Creating the List

To insert a custom list of choices, follow these steps.

1. Open the Ektron CMS400.NET configuration file, site root/workarea/contentdesigner/DataListSpec.xml.

2. Insert the new list following the pattern of the other lists in the file. Below is an example of such a list.

<datalist name="MyNewList">

<schema datatype="string" />

<item default= "true" value= "Green" />

<item value= "Red" />

<item value= "Blue" />

</datalist>

Notes:

you can specify a data type. Values are: string, nonNegativeInteger, date, decimal.

as shown in the third line above, you can specify a default value

Creating a Dynamically Populated Choice List

You specify the elements of the custom options list described above in the configuration data. You can also create a dynamically-populated list from any XML source. The source can be on your server or on a remote Web site. Follow these steps to add a dynamic data list to the Choices field.

1. Follow steps 1 through 3 in Creating the List.

2. Insert a new datalist item according to this pattern.

<datalist name="MyNewList" src="{url to xml data source}" select="{xpath to data item element}" captionxpath="{relative xpath to data item's display text}" valuexpath="{relative xpath to data item's value}">

Important: The datalist name must match the listchoice data attribute.

For example

<datalist name="USPS-CA" src="[eWebEditProPath]/uspsca.xsd" select="/xsd:schema/xsd:simpleType/xsd:restriction/xsd:enumeration" captionxpath="xsd:annotation/xsd:documentation" valuexpath="@value" namespaces="xmlns:xsd='http://www.w3.org/2001/XMLSchema'" validation="select-req">

In this example, the data list is stored in the uspsca.xsd file, located within the ewebeditpro folder. However, it could be in any XML data source.

Calculated

Use a calculated field to perform a calculation based on values in other fields. For example, if your screen collects mortgage information, you could create one field to collect the mortgage and interest payment and another to collect taxes and insurance. The calculated field could sum those two numbers and display the monthly payment.

You can validate a calculated field. For example, you can require a positive number between 100 and 1,000.

Calculated fields are display only -- users cannot edit them.

Important: If a field will be referenced in a calculation, use the validation feature to require a value for that field. This forces the user to enter a number to be used in the calculation.

The following topics explain a tabular data field in more detail.

Dialog Box

Fields on the Calculated Field Dialog

Using the Formula Field

Notes

Referencing Other Calculated Fields

Explanation of Examples

Fields on the Calculated Field Dialog

Field

Description

Descriptive Name

Enter the name of the field.

Indexed

Check if you want to index this field. For more information, see XML Indexing.

The Indexed field may or may not appear, depending on how your administrator has set up your system.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over this field.

Formula

Enter the calculation that this field will perform. See Also: Using the Formula Field

Select Field

Click this button to select a field to reference in the calculation. For more information, see Using the Formula Field.

Examples

Click the down arrow to the right of this field to see examples of calculations you can perform. When you select an example, it is copied into the Formula field.

See Also: Explanation of Examples

Validation

Select the kind of validation to apply to this field. Your choices are:

No validation - the user’s response is not checked

Non-negative number (required) - the result of the calculation must be a positive number

If you assign to this field any value other than No validation, the field is surrounded by red dashes in Data Entry mode. If the user’s response does not meet the validation criteria, the field remains surrounded by red dashes. Your system administrator determines if a user can save a screen with invalid data.

Error message

If you select Non-negative number above, insert text that appears on the screen if the user’s response does not meet this criterion.

Custom Validation

See Custom Validation

Data Style

See The Data Style Field

Advanced

See Advanced Tab

Using the Formula Field

You can copy a sample calculation into the Formula field by clicking the Examples field and selecting an operation from the drop down list. For example, if you click Examples Add two numbers {X}+{Y}, {X}+{Y} appears in this field.

Next, replace the variables with fields on the screen. Be sure to select the curly brackets ({}) as well as the letter between them. Then, when the user enters data into those fields, the calculation is performed using the current field values.

If a calculated field tries to perform a numerical calculation with a value that is blank or contains letters, NaN appears in the field. (NaN stands for “not a number.”)

If a calculated field tries to divide by zero, Infinity appears.

Important: If the user does not replace all variables with a field or a number, when the content is validated, validation will fail.

To do this, follow these steps.

1. Select the first variable to replace. To continue the example, select {X}.

2. Select a field to replace that variable in the calculation.

3. Click Replace X in Formula.

Important: If a variable appears more than once in a formula (for example, {X} * number({X}<= {Y}) + {Y} * number({X}>{Y}), you only need to replace the first occurrence - eWebEdit400 replaces subsequent occurrences for you.

4. Continue replacing all variables in the formula.

Notes

If an XML document contains several occurrences of a field that is referenced in a formula, the value is derived as follows:

- When using the XPath functions sum() and count(), all values with the field name are considered. For example, a document includes three books whose prices are $10, $20 and $30. In this case, sum’s value is $60.

- When using all other functions, the first value is used. For example, a document includes three books whose prices are $10, $20 and $30. If a calculation formula refers to <price>, its value is $10.

You can replace a variable with a number instead of a field. For example, replace {X} * {Y} with ../price * 1.15.

The expression can be complex, such as (round(Field1 * 0.80) + (1 div Field2)) - 2.

You can use a string expression that creates a text message. For example, to calculate a full name from its parts: concat( title, ' ', givenname, ' ', familyname), which could produce “Dr. Jonathan Smythe”.

Referencing Other Calculated Fields

A calculated field can only reference other calculated fields that appear before it in a document. For example, a document collects a series of numbers.

One calculated field counts the number of numbers.

Another totals their values.

A third computes the average by dividing the total by the count.

In this example, you must place the third field below or to the right of the first two fields. Calculated fields that are defined later in a document do not appear in the Select Field or Group dialog.

Explanation of Examples

The following table explains the standard examples that appear in the Examples drop-down list of the Calculated Field dialog. Note that your system administrator can customize the list, so it may not match what is below.

Example Field Text

Example Field Formula

Description

Add two numbers

{X} + {Y}

Add the value in the first field (X) to the value in the second field (Y).

Subtract two numbers

{X} - {Y}

Subtract the value in the second field (Y) from the value in the first field (X).

Multiply two numbers

{X} * {Y}

Multiply the value in the first field (X) by the value in the second field (Y).

Divide two numbers

format-number({X} div {Y},'0.###')

Divide the value in the first field (X) by the value in the second field (Y).

Format as a percentage

format-number({X} div {Y},'#0%')

Determine what percentage one number (X) is of another (Y).

For example, if {X}=10 and {Y}=100, the result of the calculation is 10%.

Absolute value of a number

{X} * (number({X} > 0)*2-1)

The number regardless of the sign (negative or positive).

Minimum of two numbers

{X} * number({X} <= {Y}) + {Y} * number({X} > {Y})

The smaller of two field values.

Maximum of two numbers

{X} * number({X} >= {Y}) + {Y} * number({X} < {Y})

The larger of two field values.

Zero if subtraction is negative

({X} - {Y}) * number(({X} - {Y}) >; 0)

Subtract one number (Y) from another (X). If the difference is less than zero, insert zero.

Multiply by another number if checkbox is checked

{X} * ( {Y} * number( {Z} ='true') +
number( {Z} !='true'))

X is a numeric field.

Y is another numeric field to multiply by X if a checkbox is checked.

Z is the checkbox.

For example, {X}=2 and {Y}=3

if the checkbox is checked, the result is 2 * 3, which is 6

If the checkbox is not checked, the result is 2

Round a decimal number

round({X})

Rounds the number to the nearest integer. For example, round(3.14). The result is 3.

Round up a decimal number

ceiling({X})

Returns the smallest integer that is greater than the number. For example, ceiling(3.14). The result is 4.

For negative numbers:

ceiling(-3.14) = -3

Round down a decimal number

floor({X})

Returns the largest integer that is not greater than the number argument. . For example, floor(3.14). The result is 3.

For negative numbers:

floor(-3.14) = -4

Format decimal number 0.00

format-number({X},'0.00')

Rounds a value either up or down to the hundredth place. As examples, 100 becomes 100.00, and 3.14159265 becomes 3.14.

Total numeric values from multiple fields

sum({X}[text()] | {Y}[text()] | {Z}[text()]))

Add the values in all referenced fields.

Only elements that contain a value are summed. Empty elements are excluded.

Total a list of numeric values

sum({X}[text()])

Total all values in a single repeating field. Here’s an example.

Plain Text Field properties

Name: Miles

Allow: more than one

Validation: non-negative whole number

XML Data

<root>

<Miles>89</Miles>

<Miles>12</Miles>

<Miles>23</Miles>

<Miles>19</Miles>

</root>

sum(Miles) equals 89+12+23+19=143

Only elements that contain a value are summed. Empty elements are excluded.

Average a list of numeric values

format-number(sum({X}[text()])
div count({X}),'0.###')

Calculate the average of all values in a single repeating field.

To continue the example from the Total a list of numeric values field (above):

Plain Text Field properties

Name: Miles

Allow: more than one

Validation: non-negative whole number

XML Data

<root>

<Miles>89</Miles>

<Miles>12</Miles>

<Miles>23</Miles>

<Miles>19</Miles>

</root>

Average=89+12+23+19=143

divided by the number of values (4)= 35.75

Only elements that contain a value are summed. Empty elements are excluded.

Count the number of values in a list

count({X})

Calculate the number of values in a single repeating field.

To continue the example from the Total a list of numeric values field (above):

Plain Text Field properties

Name: Miles

Allow: more than one

Validation: non-negative whole number

XML Data

<root>

<Miles>89</Miles>

<Miles>12</Miles>

<Miles>23</Miles>

<Miles>19</Miles>

</root>

Count = 4

Lowercase text

translate({X},'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')

Replace all uppercase characters with the lowercase version of that character

Uppercase text

translate({X},'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Replace all lowercase characters with the uppercase version of that character

Remove extra spaces

normalize-space({X})

Remove extra space characters from content\

Concatenate text

concat({X}, ', ', {Y})

Link text strings together into a single string. For example, concat('The',' ','XML') yields The XML.

Size of a text string

string-length({X})

Count the number of characters in a selected field’s value. For example, if the referenced field’s value is Hello, string-length = 5.

Calendar

Insert a calendar field when you want a Smart Form to include a date field. To set the date, click one from a calendar.

Because users cannot enter digits, a standard date format is ensured. The date is stored as a standard XML date (in the format yyyy-mm-dd), and localized to the computer of the user viewing it.

Fields on the Calendar Field Dialog

Field

Description

Descriptive Name

Enter the name of the field.

Indexed

Check if you want to index this field. For more information, see XML Indexing

The Indexed field may or may not appear, depending on how your administrator has set up your system.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over this field.

Default value

If you want this screen to have a default date when the user first sees it, click the calendar icon to the right and select a date. The user can change the date in Data Entry mode.

Note: If you enter a default date, you cannot later remove it. You can change it. If necessary, you can delete the field and enter a new one.

Use

See The Use Field

Allow

See The Allow Field

Warning! Do not insert a calendar field into a Smart Form that allows multiple entries (using the Allow more than One option on the dialog). If you do, you cannot search the Smart Form using that field.

Validation

If you want to require the user using the calendar to enter a response, click the down arrow to the right of this response field and select Cannot be blank.

Error Message

If you select Cannot be blank above, insert text that appears on the screen if the user’s response does not meet this criterion.

Custom Validation

See Custom Validation with a Calendar Field

Data Style

See The Data Style Field

Advanced

See Advanced Tab

Custom Validation with a Calendar Field

The Calendar Field dialog features a Custom Validation area (illustrated below).

The Custom Validation area can ensure the user’s input is greater or less than the date you are inserting on the Data Design screen.

The Data Type field shows Date.

The Condition field displays the validation logic.

The Examples drop-down list shows validation expressions that you can apply to the field.

Any Error Message displays in Data Entry mode when the user inserts an invalid value. Your system administrator determines if a user can save the invalid data.

The Select a Field to Insert area displays fields that can be inserted into the Condition field. You must choose a calendar type field (note the calendar to the left of these fields).

Example of Creating Custom Validation

As an example of custom validation, assume a field collects the date when a patient’s health insurance policy expires. You want to make sure the date is later than today. To accomplish this, follow these steps.

1. Create a calendar field that prompts for today’s date.

2. Create another calendar field that prompts for a patient’s health insurance policy expiration date.

3. While creating the second field, in the Validation section, click Custom Validation. The Custom validation screen appears.

4. Click the down arrow to the right of the Examples field to see sample logic.

5. Click Date After (not(. >={X}). This option lets you specify that the user’s response must be later than a specified date.

6. In the Condition field, select {X} and click the Select Field button. The Select Field or Group screen appears.

7. Select the field that prompts for today’s date, which you created in Step 1.

8. That field replaces {X} in the Condition field.

9. Move the cursor to the Error Message field and compose an error message. For example: Must be after today. Your screen should look like this.

10. Press OK.

11. Press OK to save that dialog and test the validation on the date field. To do this, switch to Data Entry mode and enter a date earlier than today to verify that validation works as expected.

Image Only

Use an Image Only field to place an icon on the screen, which the user in Data Entry mode can click to insert an image into the Web content. You can insert a default image if desired.

To let the user insert any file, such as a Microsoft Word document, use a File Link field. See Also: File Link

Using an Image Only Field in Data Entry Mode

In Data Entry mode, the image’s caption appears, followed by a default image (if you specify one) and this icon:

Note: The user can only insert a file whose extension is defined within the <validext> element of the configdataentry.xml file. Your system administrator can help you do this.

Fields on the Image Only Dialog

Field

Description

Descriptive Name

Enter the name of the field.

Indexed

Check if you want to index this field. For more information, see XML Indexing.

The Indexed field may or may not appear, depending on how your administrator has set up your system.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over this field.

Use

See The Use Field

Allow

See The Allow Field

Value

Whether the value is an element or plain text.

Value is an element renders the field as <img src=”url” alt=”text” /> for an image.

Value is plain text renders the field as just the url.

Default Image Location

If desired, you can insert a default image, which might be the most common image or simply a reminder that an image needs to be inserted.

To help find the image, click the From File button and navigate to image file.

You can only insert an image file whose extension appears between the <validext> tags in the configdatadesign.xml file. For example:

<validext>gif,jpg,png,jpeg,jpe,doc,txt

</validext>

Cannot be blank

If you want to require the user completing this field to enter a response, click inside this check box.

Description

Enter the image’s alt text, which is used as a replacement for an image whenever it cannot be seen. For example, a visually impaired person is using a screen reader.

Advanced

See Advanced Tab

File Link

Use a File Link field to place an icon on the screen which the user in Data Entry mode can use to link to any Library file, such as a Microsoft Word document or a .gif image file. (You can also use an Image Only field to let the user insert an image. See Also: Image Only )

The File Link field does not let you link to Ektron CMS400.NET assets.

Using a File Link Field in Data Entry Mode

In Data Entry mode, the file link field’s caption appears, followed by this icon: .When the user clicks the icon, this screen prompts the user to specify information about the link.

Note: The user can only insert a file whose extension is defined within the <validext> element of the configdataentry.xml file. Your system administrator can help you do this.

Fields on the File Link Field Dialog

Field

Description

Descriptive Name

Enter the name of the field.

Indexed

Check if you want to index this field. For more information, see XML Indexing

The indexed field may or may not appear, depending on how your administrator has set up your system.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over this field.

Use

See The Use Field

Allow

See The Allow Field

Value

Whether the value is an element or plain text.

Value is an element renders the field as <img src=”url” alt=”text” /> for an image.

Value is plain text renders the field as just the url.

Default Location

If desired, you can insert a default link, which can be the most common link or simply an example.

To help find the link, click the Select button and navigate to a file. You can only insert a file whose extension appears between the <validext> element of the configdatadesign.xml file. For example:

<validext>gif,jpg,png,jpeg,jpe,pdf,doc</validext>

Cannot be blank

If you want to require the user completing this field to enter a response, click this check box.

Description

If desired, enter text that the user can click to access the linked file.

Target Frame

Use this field to indicate how the hyperlinked files will appear when clicked.

New Window(_blank) - In a new browser window, on top of the current browser.

Same Window(_self) - In the same position within the browser window. The new window replaces the current one.

Parent Window(_parent) - If your page contains frames, in the frame that contains the frame with the hyperlink.

Browser Window(_top) - If your page contains frames, in the full display area, replacing the frames.

Data Style

See The Data Style Field

Advanced

See Advanced Tab

Resource Selector

A Resource Selector field lets you place elements of Ektron CMS400.NET content, taxonomies, collections or folders on a Smart Form. For example, on the page below, all content in a selected folder appears.

Each content item in the folder is represented as a hyperlink followed by its summary. A site visitor can click the hyperlink to view the content.

An alternative display, showing hyperlinks only, appears below.

So, a Resource Selector field acts like server controls that let you place content on a Web page, such as the Content Block and List Summary controls. The advantages of the Resource Selector field are:

You can add individual content items or all content in a folder, collection or taxonomy category to a Smart Form. This means you can easily position resources then surround them with text, images, etc., to place them into proper context.

Management is handled within the Workarea. So, CMS administrators can display content via a Smart Form without needing a developer to create/modify templates and server controls.

The following topics explain using the Resource Selector field in more detail.

Resource Selector Examples

Overview of Using a Resource Selector

Adding a Resource Selector Field

Letting a Content Author Add Content

Letting a Content Author Add a Folder, Taxonomy or Category

How a Content Author Adds Resource Selector Field

Resource Selector Examples

A KB article that provides links to other, related KB articles.

Single sourcing, that is, reuse the same content on different pages. This is helpful for content that needs to appear repeatedly (copyright information, license agreement, contact information, etc.), but you want to maintain only one version.

Overview of Using a Resource Selector

Note: Before reading this section, you should be familiar with the process of creating Smart Forms. See Also: Adding a New Smart Form

When using a Resource Selector on an XML Smart Form, you follow these steps. You would follow most of the steps with any Smart Form.

Step

Illustration

1. An XML Smart Form Designer creates a Smart Form configuration.

2. While editing the Data Design, he places a Resource Selector field on the configuration.

3. While placing a Resource Selector field, the designer is prompted to determine its properties.

For example, can the content author select content, a taxonomy category, a collection or a folder? These properties are described in Adding a Resource Selector Field.

4. An administrator assigns the Smart Form configuration to an Ektron CMS400.NET folder.
See Also: Assigning Smart Forms to a Folder

5. An author creates a Smart Form based on that configuration.

6. He adds content, a collection, a taxonomy category, or a folder to the Smart Form, along with other field types.

7. A site visitor browses to the page and views the assigned content.

Adding a Resource Selector Field

1. To add a Resource Selector field to a Smart Form configuration, click the button shown below.

2. The following dialog appears.

3. Complete the first three fields as described below.

Field

Description

Descriptive Name

Enter the name of this field.

Internally, the name is used as the field’s caption.

The Name Field’s Default Value

By default, the Data Designer assigns a name made up of Field followed by the next available number. So, the first field’s default name is Field1, the second field’s default name is Field2, etc. You can change the default if you want.

Field Name

Enter the field’s element name. This defines the field in the XML.

Tool Tip Text

Enter the text that appears when a user hovers the cursor over the table’s column headers.

4. Decide if this resource selector field will let the content author insert content, a collection, a taxonomy category or a folder. The following sections walk through these options.

Letting a Content Author Add Content

Letting a Content Author Add a Folder, Taxonomy or Category

Letting a Content Author Add Content

To add a Resource Selector field that lets an author add content to a Smart Form, follow these steps.

Prerequisites: You completed the first three fields on the Resource Selector Field dialog. See Also: Adding a Resource Selector Field

1. On the Resource Selector Field dialog, at the Resource Type dropdown, select Content Resource.

2. The Default Value field lets you define a default content item. If you do, when a content author places this field on a Smart Form, he sees the default content (as shown below).

The author can accept the default or change it.

To specify a default content item, click the folder icon next to Default Value. The Select Content dialog appears (shown below).

Use the Folder, Taxonomy, or Search tab to identify the default content. See Also: Taxonomy, The Search Published Tab

Note: When browsing by folder, you only see content folders. You do not see eCommerce catalog, Blog, Community, or Discussion Board folders.

3. Use the Allow section of the dialog to define a minimum and maximum number of content items that can appear where you are inserting this Resource Selector.

These settings affect the content author’s work with this field on a Smart Form in the following way. Assume you set a Minimum of 1 and a Maximum of 2. After the content author adds two content items for this resource selector, his only options (shown below) are to remove or rearrange fields -- he cannot add more.

4. Click the Type tab of the Resource Selector Field dialog.

All content types that a content author may add appear. Uncheck types that you do not want to let a content author add. See Also: Types of Content

5. Click the Configuration tab. This tab lets you determine how a content author can select content for the Smart Form.

If you check all three options (as shown above), when a content author clicks this Resource Selector, he sees the following dialog.

Note that the dialog lets the author browse the folder structure, taxonomy structure, or use search to select content.

Note: When browsing by folder, you only see content folders. You do not see eCommerce catalog, Blog, Community, or Discussion Board folders.

On the other hand, if you uncheck Browsing taxonomy categories and Searching for key words, the content author could only use the Folder tab to select content.

6. Click the Appearance tab. This tab lets you determine the default appearance of this Smart Form on your Web site.

Note: Unlike other settings on this dialog, the content author is not involved in the Appearance settings.

The table below provides a sample of each Appearance option.

Appearance option

How content appears on Web site

Content

Content Title

Title followed by content

Quick Link

Quicklink with Summary

7. Save the dialog and configuration.

8. To learn how a content author works with this configuration, see How a Content Author Adds Resource Selector Field.

Letting a Content Author Add a Folder, Taxonomy or Category

To add a Resource Selector field that lets an author add a folder, taxonomy, or collection to a Smart Form, follow these steps.

Prerequisites: You completed the first three fields on the Resource Selector Field dialog. See Also: Adding a Resource Selector Field

1. On the Resource Selector Field dialog, at the Resource Type dropdown, select Folder Resource, Taxonomy Resource, or Collection Resource.

2. The Default Value field lets you define a default folder, taxonomy or collection. If you do, when a content author places this field on a Smart Form, he sees the default item (see example of folder below).

The author can accept the default or change it.

To specify a default folder, taxonomy, or collection, click the folder icon next to Default Value. A Select dialog appears (see example of folder selector below).

Use it to select the default folder, taxonomy, or collection.

Note: When browsing by folder, you only see content folders. You do not see eCommerce catalog, Blog, Community, or Discussion Board folders.

3. Use the Allow section of the dialog to define a minimum and maximum number of folders, collections, or taxonomy categories that can be placed on the screen where you are inserting this Resource Selector.

These settings affect the content author’s work with this field on a Smart Form in the following way. Assume you set a Minimum of 1 and a Maximum of 2. After the content author adds two items for this resource selector, his only options (shown below) are to remove or rearrange fields -- he cannot add more.

4. Click the Configuration tab. This tab lets you determine the starting folder for this folder.

Note: The Configuration tab is not available for Collection and Taxonomy Resource Types.

You can browse the structure to pick a starting item. You can also determine if the content author will have access to

all folder in the structure

this folder and its subfolders

this folder only

Note: When browsing by folder, you only see content folders. You do not see eCommerce catalog, Blog, Community, or Discussion Board folders.

5. Click the Appearance tab. This tab lets you determine the default appearance of this Smart Form on your Web site.

Note: Unlike other settings on this dialog, the content author is not involved in the Appearance settings.

The table below provides a sample of each Appearance option.

Appearance option for ...

How folder appears on Web site

Folders

List Quicklinks and summary of folder contents

All content in folder appears in format shown above.

List Quicklinks of folder contents

All content in folder appears in format shown above.

Breadcrumb

The folder’s breadcrumb path appears, as defined on the folder Properties screen’s Breadcrumb tab. See Also: Creating SiteMap Breadcrumbs

Taxonomy
Directory Server Control This is the only option if the Resource Type is Taxonomy Resource. See Also: Directory Server Control
Collection

List Quicklinks and summary of collection items

Content in collection appears in format shown above.

List Quicklinks of collection items

Content in collection appears in format shown above.

6. Save the dialog and configuration.

7. To learn how a content author works with this configuration, see How a Content Author Adds Resource Selector Field.

How a Content Author Adds Resource Selector Field

When a content author creates a Smart Form whose configuration uses Resource Selector fields, they appear as shown below.

In the above example above, the top field lets the content author select content (id 30 is the default), and the lower one lets him select a folder (id 36 is the default).

To select either one, he clicks the folder to its right, then uses the dialog to make the selection. If working with content, the tabs which appear on the dialog are determined when the resource is placed on the Smart Form configuration. See Also: Click the Configuration tab. This tab lets you determine how a content author can select content for the Smart Form.

Note: If someone changes the title of content used in a Resource Selector field, the title is not updated on the Smart Form . In the illustration above, if someone changed the title of content ID 30, you would still see Sample Content Block when viewing the Resource Selector field.

Fields that Appear on Several Dialogs

Advanced Tab

The Advanced tab screen lets you control the XML that the field produces.

This dialog has two sections.

Type - lets you generate XML microformats. See Also: The Type Area of the Advanced Tab

Root Tag - lets you replace the <root> tag with another element name. See Also: Using a Tag Other Than <Root>

The Type Area of the Advanced Tab

The dialog lets you generate XML microformats made up of standard XHTML tags and attributes that contain a specific structure and values. The types are described below.

Important: In order for Smart Form fields to searchable, they must be stored as elements not attributes. See Also: Advanced Tab If you are upgrading to version 8.0, inspect your Smart Forms and change field properties as needed so they are stored as elements not attributes.

Type

This field defines

Example

Element

A unique tag. The user’s response to the field becomes its value.

<Lastname>Rogers</Lastname>

Attribute

An attribute of the containing field. The containing field is typically a Group Box.

If you insert an Attribute field type, the Field Name field on the dialog box is grayed out. The field name and type can only be edited on the Advanced Field properties screen.

<PtInformation Lastname="Rogers">

</PtInformation>

Content

The content of the containing field, typically a Group Box.

Note that, in this case, field name is not used. As a result, the Field Name field is grayed out. The field name and type can only be edited on the Advanced Field properties screen.

Since most fields define their own content, this option is typically used to define a value to a Group Box that contains other fields defined as attributes.

Warning!   Only one Content type field is valid within a containing field.

<PtInformation>
Rogers
</PtInformation>

Sample Microformat

For example, the microformat of an event looks like this.

<span class="event">

<a class= "url" href="https://www.lisa.org/events/2006nyc/package_registration.html?from=fn1206 ">LISA Global Strategies Summit</a>

</span>

The Data Entry view looks like this.

The Data Design view looks like this.

Additional Notes about the Type Area of the Advanced Tab

If the element is a group box or table, its type must be Element because it surrounds other elements.

If the element is a Rich Area field, its type must be Element or Content.

The Use Field

Click May not be removed if this field must be included on the screen. Otherwise, click May be removed.

If you check May be removed, when this field appears on a data entry screen, an icon () appears to the left of the field.

If the user clicks the icon, a dropdown menu provides an option to remove the field, as shown below.

If the user removes the field, field name replaces the field on the data entry screen to indicate that the field was removed and can be re-added if necessary.

For example, if the field’s display name is street address, and the user removes the field, appears in place of the field.

Note: The menu icon () can also indicate that the user can add instances of a field (see the Allow field, below). So, if a field is required, the icon could appear but omit a Remove option.

The Allow Field

Check more than one if you want to let the user entering data add instances of this field. Otherwise, check only one.

Warning! Do not insert a calendar field into a Smart Form that allows multiple entries (using the Allow more than One option on the dialog). If you do, you cannot search the Smart Form using that field.

For example, if a screen is collecting names and addresses and you want to let the user enter several of them, check more than one.

If you check more than one, when this field appears in Data Entry mode, appears to the left of the field, as shown below.

If the user entering data clicks , a menu appears (shown above), which lets the user click Duplicate to add instances of the field to the screen.

Note: The menu icon () can also indicate that the user can remove a field (see the Use field, above). So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.

The Data Style Field

Click the Data Style button to apply formatting to the field that accepts user input. When you do, the following dialog appears.

Use the dialog to assign the following formatting attributes to a user response field.

Font style and size

Bold and italic

Text alignment (especially helpful for formatting dollar amounts in a plain text field)

Underline or strikethrough

Font color and background color

Note: The configuration data controls a command's appearance on the toolbar and on the Data Style dialog. For example, if <button command="cmdfontname" /> is removed from configdatadesign.xml, it disappears from the toolbar and the Data Style dialog.

Below is an example of a response field whose font, size, alignment, background, and foreground colors were modified via this dialog.

Custom Validation

The Plain Text and Calculation field dialogs feature a Validation tab (illustrated below).

Adding Standard Validation Options

By default, the Data Designer provides several standard validation options. You can see them by clicking the down arrow to the right of the Validation dropdown.

For a description of standard validation options, see Validation.

If you will frequently use a validation format that does not appear on the list, the following Ektron KB article provides instructions for creating additional validation options: http://dev.ektron.com/kb_article.aspx?id=7420

Creating Custom Validation Criteria

If the standard validation options do not provide the flexibility you need, use the custom validation feature to ensure the following about the user’s input.

The data type - the default types are

- text

- URL

- whole number

- decimal number

- floating point number (Floating point includes scientific notation, so is appropriate for scientific numbers. Decimals usually suffice for business numbers.)

Note: Your system administrator may customize the choices.

The field value has one of the following relationships with another field, a number, or an expression - the default expressions are

- between two values (either another field or a number that you specify)

- less than

- equal to

- not equal to

- maximum length (usually for text responses)

Note: Your system administrator may customize the choices.

If the user’s response fails to meet the criteria, you can compose an error message that appears when that happens. Your system administrator determines if a user can save the invalid data.

When the Custom Validation button is clicked, the Custom Validation dialog appears.

The Data Type field is the value’s basic type, for example, text number or URL.

The Condition field displays the validation logic.

The Examples drop-down list shows validation expressions that the data design creator can apply to the field.

Any Error Message displays in Data Entry mode when the user inserts an invalid value.

This dialog displays fields that can be inserted into the Condition field. Some field types, like the RichArea field, are not listed. See Also: Referencing Other Calculated Fields

Example of Creating Custom Validation

As an example of custom validation, assume that a field collects telephone numbers, and you want to make sure the user enters 10 digits. To accomplish this, follow these steps.

1. Click the Plain Text Field dialog and complete the screen.

2. In the validation section, click Custom Validation. The Custom validation screen appears.

3. In the Data Type field, select Whole Number from the drop down list. This ensures that the user can only enter digits.

4. Click the down arrow to the right of the Examples field to see sample logic.

5. Click Maximum text length... . This option lets you specify the length of the user’s response.

6. string-length(.) <= {X} appears in the Condition field.

7. Since you want the user’s input to equal 10, remove the less than sign (<) from the calculation. Now it looks like this: string-length(.) = {X}.

8. Replace the {X} with 10. Now, it looks like this: string-length(.) = 10.

9. Move the cursor to the Error Message field and compose a relevant error message. For example: must be 10 digits.

10. Your screen should look like this.

11. Press OK and return to the Plain Text field dialog.

12. Press OK to save that dialog and test the validation on the phone number field. To do this, switch to Data Entry mode and enter more or fewer than 10 digits, as well as non-digit characters to verify that validation works as expected.


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.