You can insert the following data field types into a data entry screen.
IMPORTANT: For Smart Form fields to searchable, they must be stored as elements or attributes not content.If you are upgrading to version 8.5 or higher, inspect your Smart Forms and change field properties as needed so they are not stored as content.
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 2 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.
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.
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.
{X} * number({X}<= {Y}) + {Y} * number({X}>{Y})
, you only need to replace the first occurrence—the editor replaces subsequent occurrences for you.NaN
appears in the field. (NaN
stands for “not a number.”)Infinity
appears.sum()
and count()
, all values with the field name are considered. For example, a document includes 3 books whose prices are $10, $20 and $30. In this case, sum
’s value is $60.<price>
, its value is $10.{X} * {Y}
with ../price * 1.15
.(round(Field1 * 0.80) + (1 div Field2)) - 2
.concat( title, ' ', givenname, ' ', familyname)
, which could produce “Dr. Jonathan Smythe”.In this example, you must place the third field below or to the right of the first 2 fields. Calculated fields that are defined later in a document do not appear in the Select Field or Group dialog.
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.
Example Field Text |
Example Field Formula |
Description |
Add 2 numbers |
{X} + {Y} |
Add the value in the first field (X) to the value in the second field (Y). |
Subtract 2 numbers |
{X} - {Y} |
Subtract the value in the second field (Y) from the value in the first field (X). |
Multiply 2 numbers |
{X} * {Y} |
Multiply the value in the first field (X) by the value in the second field (Y). |
Divide 2 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 2 numbers |
{X} * number({X} <= |
The smaller of 2 field values. |
Maximum of 2 numbers |
{X} * number({X} >= |
The larger of 2 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 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
|
Round a decimal number |
round({X}) |
Rounds the number to the nearest integer. For example, |
Round up a decimal number |
ceiling({X}) |
Returns the smallest integer that is greater than the number. For example, 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, 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()] | |
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
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()]) |
Calculate the average of all values in a single repeating field. To continue the example from the Total a list of numeric values field: Plain Text Field properties Name: Miles Allow: more than one Validation: non-negative whole number XML Data
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: Plain Text Field properties Name: Miles Allow: more than one Validation: non-negative whole number XML Data
Count = 4 |
Lowercase text |
translate({X},'ABCDEFGHIJKLMN |
Replace all uppercase characters with the lowercase version of that character |
Uppercase text |
translate({X},'abcdefghijklmn |
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, |
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. |
Insert a calendar field when you want a Smart Form to include a date field. You may choose to use the current date or set a date. 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.
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.
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 drop-down menu provides an option to remove the field.
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). So, if a field is required, the icon could appear but omit a Remove option.
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.
If the user entering data clicks , a menu appears, 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). So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.
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.
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:
Must be after today
. Your screen should look like this.
A Checkbox field is only one character wide and accepts one of 2 possible values: checked or unchecked. For example:
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.
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. The data entry user could check the first 2 and leave the third blank.
You can do the following with a Choices field.
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. |
music
to be collected when the data entry user selects this item and saves the page, enter music here.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.
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.
To indicate an option is the default choice, check the Selected checkbox.
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.
Although you can create a custom list of choices using the Item List area of the Choices Field dialog, that list is only available in that field of that screen. If you want to insert the same list in another section of the screen or a different screen, you must re-enter all options. However, if you create a list according to the following steps, 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.
To insert a custom list of choices:
siteroot/workarea/contentdesigner/DataListSpec.xml
.<datalist name="MyNewList"> <schema datatype="string" /> <item default="true" value="Green" /> <item value="Red" /> <item value="Blue" /> </datalist>
NOTE: You can specify a data type of value: string, nonNegativeInteger, date, decimal. You also can specify a default value (as shown in the third line).
You specify the elements of the custom options list described 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.
siteroot/workarea/contentdesigner/DataListSpec.xml
.<datalist name="MyNewList"> <schema datatype="string" /> <item default="true" value="Green" /> <item value="Red" /> <item value="Blue" /> </datalist>
<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.
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.
Grouping fields in Data Entry mode lets you add another instance of a group. For example, if a screen collects information about each telephone call, you can click Insert Below to insert a new group of fields, ready to collect information about the next call.
Use the eyeglass icon to expand or collapse fields within a group.
You also can suppress a group of irrelevant fields. For example, assume a screen includes 2 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.
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 drop-down menu provides an option to remove the field.
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). So, if a field is required, the icon could appear but omit a Remove option.
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.
If the user entering data clicks , a menu appears, 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. So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.
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.
The Advanced tab lets you generate XML microformats made up of standard XHTML tags and attributes that contain a specific structure and values.
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>
NOTE: 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.
<Lastname>Rogers</Lastname>
<PtInformation Lastname="Rogers">
</PtInformation>
WARNING! Only one Content type field is valid within a containing field.
<PtInformation>
Rogers
</PtInformation>
By default, Ektron surrounds your Data Design with <root>
XML tags. You can replace the <root>
tags with another element name by following these steps.
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.
Only the following field types can be used in a Relevance condition.
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.
NOTE: The location of the Group Box field is independent of the location of the fields to which you will apply conditions.
A checkbox field is checked ({X} = 'true')
, click the check box field whose value must be true
for this group to appear.You should switch to Data Entry mode and test the Relevance conditions.
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:
See Also: Choices
A field has a given value ({X} = 'value')
.IMPORTANT: The text that replaces Value must exactly match the desired value of the selected field.
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 Link field.
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.
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 drop-down menu provides an option to remove the field.
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). So, if a field is required, the icon could appear but omit a Remove option.
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.
If the user entering data clicks , a menu appears, 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. So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.
<img src=”url” alt=”text” />
for an image.<validext>
tags in the configdatadesign.xml file. For example:<validext>gif,jpg,png,jpeg,jpe,doc,txt
</validext>
Use a 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 assets.
In Data Entry mode, the file link field’s caption appears, followed by this icon: .When the user clicks the icon, a hyperlink screen prompts you to specify information about the link.
NOTE: 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.
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 drop-down menu provides an option to remove the field.
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). So, if a field is required, the icon could appear but omit a Remove option.
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.
If the user entering data clicks , a menu appears, 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. So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.
<img src=”url” alt=”text” />
for an image.<validext>
element of the configdatadesign.xml file. For example:<validext>gif,jpg,png,jpeg,jpe,pdf,doc</validext>
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.
A Resource Selector field lets you place elements of Ektron content, taxonomies, collections or folders on a Smart Form. For example, on the following page, 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 as follows.
Therefore, 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:
The following overview shows how to use a Resource Selector on an XML Smart Form.
When a content author creates a Smart Form whose configuration uses Resource Selector fields, they appear as follows.
The upper 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, click the folder to its right, then make the selection. If working with content, the tabs that appear on the dialog are determined when the resource is placed on the Smart Form configuration.
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, if someone changed the title of content ID 30, you would still see Sample Content Block when viewing the Resource Selector field.
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 2 content items for this resource selector, the only options are to remove or rearrange fields; you cannot add more.
The folder’s breadcrumb path appears, as defined on the folder Properties screen’s Breadcrumb tab. See Also: Creating SiteMap Breadcrumbs
This is the only option if the Resource Type is Taxonomy Resource. See Also: Directory Server Control
The Tabular data button inserts a table into which you can place other types of fields. It’s similar to a group box but its advantage over a group box is that it lets you place fields in columns. After you insert a table with the Tabular data button, you can insert an appropriate type of field into each column. For example, the Description field type is plain text, while the In Stock? field type is a choice.
If you insert a field into a table and its caption appears to the left of the data entry region, move the caption to the column header.
NOTE: To delete a column, place the cursor in the column, right click the mouse, and select Delete Column. You cannot reduce the number of columns by editing the Tabular Data dialog’s Columns field.
IMPORTANT: Only table cells into which you place a field are available to visitors of your Web page.
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 drop-down menu provides an option to remove the field.
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). So, if a field is required, the icon could appear but omit a Remove option.
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.
If the user entering data clicks , a menu appears, 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. So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.
Tabular data creates 3 levels of XML tags:
To explain how this works, use the following contact list as an example.
Name |
Phone |
|
John Doe |
555-1212 |
|
Mary Smith |
555-8765 |
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 the example, every contact is represented in XML as:
<Name>John Doe</Name> <Phone>555-1212</Phone> <Email>[email protected]</Email> and <Name>Mary Smith</Name> <Phone>555-8765</Phone> <Email>[email protected]</Email>
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>[email protected]</Email></Contact><Contact> <Name>John Doe</Name> <Phone>555-1212</Phone> <Email>[email protected]</Email> </Contact> Contact> <Name>Mary Smith</Name> <Phone>555-8765</Phone> <Email>[email protected]</Email> </Contact> </AddressBook>
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.
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.
New York
as the value.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 drop-down menu provides an option to remove the field.
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). So, if a field is required, the icon could appear but omit a Remove option.
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.
If the user entering data clicks , a menu appears, 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). So, even if a field allows only one instance, the icon could appear but the menu would only display Remove.
<p>
tags around a single line of text. Uncheck this box if you want the editor to strip <p>
tags from a single line of text.NOTE: This checkbox has no effect if text that allows rich formatting consists of more than one line.
Sample Results
Checked: <p>Here is sample text</p>
Unchecked: Here is sample text
NOTE: Decimal numbers include whole numbers because the decimal point is implied. That is, 12 is 12.0000.
A leading minus sign “-” is allowed. The decimal point must be period (.), even in locales that normally use a comma (,).
ANA NAN
, where A
is an alphabetical character and N
is a numeric.For more information, see Creating Custom Validation Criteria.
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.
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.
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 drop-down.
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
If the standard validation options do not provide the flexibility you want, use the custom validation feature to ensure the following about the user’s input.
NOTE: Your system administrator may customize the choices.
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.
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:
string-length(.) <= {X}
appears in the Condition field.
string-length(.) = {X}.
{X}
with 10. Now, it looks like this: string-length(.) = 10.
must be 10 digits
. Your screen should look like this.