Prerequisite: Smart Forms can be created only by members of the Administrators group or those defined in Manage Members for Role: Smart Forms Admin screen
Use Smart Forms to display, save, and validate the content properly. Smart Forms use XML tags (that are hidden from users) and serve content to various presentation devices (PDAs, mobile phones, and so on), which saves users from creating duplicate content. An XML schema validation ensures the accuracy and format of your Web content, which reduces review and revision time.
Using Smart Forms with Ektron provides the following benefits:
The following are examples of industries that can benefit from XML Indexing.
You should use XML content whenever possible because of the following advantages.
To access the Smart Form section of the Workarea, go to Settings > Configuration > Smart Form Configuration. The View Smart Forms screen appears.
When you click a Smart Form to view its information, you can do the following:
If the Smart Form was created using external XML files (instead of the Data Designer), the following information also appears:
NOTE: If no edit XSLT is specified, the Edit Data Design option is enabled in the toolbar.
The display information tab lists the XSLTs that are used when displaying XML in the respective environment.
NOTE: When a Smart Form is created using the Data Designer, a default display XSLT is also created which looks similar to the edit XSLT created in the editor. This default XSLT can be applied to the XML content.
The asterisk (*) denotes the default XSLT for the Smart Form.
The Preview tab displays the XSLT applied to the editor when XML content is created. This is the XSLT that was created for the Smart Form.
If you need to make major changes to a Smart Form, copy it and modify the copy so that you do not affect the content controlled by the original configuration. To copy a Smart Form:
A verification button () appears to the right of some fields on the Add Smart Form screen. After you identify an XSLT or schema, you can click this button to verify that the file exists in the location specified and contains well-formed XML.
NOTE: The XML Verification feature does not validate the contents of the XML file.
Possible results when clicking the verification button:
You are ready to assign the Smart Form configuration to a folder or content item. See Assigning a Smart Form to a Folder for more information.
WARNING! If you want users to insert Smart Form information using eWebEdit400, you cannot create or edit Smart Forms using external files. However, you can access eWebEdit400's source view, paste the external file's XML, then return to design view.
To add a Smart Form using external XML files:
General Information
Editor Information
Validation Information
Display Information
NOTE: When a Smart Form configuration is created using the Data Designer, a default XSLT is created based on the configuration. To learn about modifying the packaged XSLT, see Editing a SmartForm’s XSLT.
For each field on the screen:
Ektron provides several options that let you insert or edit fields in the editor. Each field type is described below.
NOTE: For information about these data field types, see Using Data Field Types.
- <root> - <Information> <LastName /> <FirstName /> <MiddleName /> <Gender>male</Gender> <Address /> <city /> <state>MA</state> <Zip /> <SSN /> <BDate /> <HomeTel /> <WorkTel /> <x-ray /> - <Dental_Insurance> <Field1 /> <OtherInsurance>N/A</OtherInsurance> <Account_Number>N/A</Account_Number> </Dental_Insurance> <medication /> <lastAppointment /> <clincal /> </Information> </root>
- <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="root"> - <xs:complexType> - <xs:sequence> - <xs:element name="Information"> - <xs:complexType> - <xs:sequence> - <xs:element name="LastName"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:minLength xmlns:xs="http://www.w3.org/2001/XMLSchema" value="1" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element name="FirstName"> - <xs:simpleType> - <xs:restriction base="xs:string">. .. ..
<fieldlist> <field name="LastName" datatype="string" basetype="text" xpath="/root/Information/LastName" title="Last Name">Last Name</field> <field name="FirstName" datatype="string" basetype="text" xpath="/root/Information/FirstName" title="First Name">First Name</field> <field name="MiddleName" datatype="string" basetype="text" xpath="/root/Information/MiddleName" title="Middle Name">Middle Name</field> <field name="Gender" datatype="choice" basetype="text" xpath="/root/Information/Gender" datalist="IDAPK3KC">Gender</field> . .. .. ..
<indexable> <xpath type="string">/root/Information/SSN</xpath> <xpath type="string">/root/Information/HomeTel</xpath> <xpath>/root/Information/WorkTel</xpath> </indexable>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" omit-xml-declaration="yes" indent="yes" encoding="utf-8" /> <xsl:strip-space elements="*" /> <xsl:variable name="ektdesignns_fieldlist" select="/*/ektdesignpackage_list/fieldlist" /> - <xsl:template match="/" xml:space="preserve"> <p> </p> - <fieldset id="Information" title="Demographic Information"> <legend>Patient Information</legend> - <div> - <p> <strong>Last Name</strong> <xsl:text> </xsl:text> <xsl:value-of select="/root/Information/LastName" /> <strong>First Name</strong> <xsl:text> </xsl:text> <xsl:value-of select="/root/Information/FirstName" /> .. .. ... ..
Buttons at the bottom of the Data Designer screen in eWebEdit400 let you edit the content several ways.
To edit any field's properties, select it, right click the mouse, and select Field Properties.
You also can use Ektron’s rich formatting capabilities to design the screen. For example, you can format text, and use tables, images and hyperlinks to guide the user through the data entry process.
The following example shows how to create a simple data entry screen that has a group box with 2 text fields and a choices field.
Sample Smart Form
. The screen refreshes and the editor appears.Address
in the Descriptive Name, Field Name, and Caption fields and click OK. The Address group box appears on the form.Street:
" then click Text Field (). Street
in the Descriptive Name, Field Name, and Tool Tip fields and click OK. The text field box appears on the form inside the Address group box.City:
" then click Text Field (). City
in the Descriptive Name, Field Name, and Tool Tip fields and click OK. The text field box appears on the form inside the Address group box.:
" then click Choices Field (). State
in the Descriptive Name, Field Name, and Tool Tip fieldsYou can specify a field or group of fields to appear on a Smart Form configuration only under certain conditions. For example, a Winter outdoor image does not appear until November, and drops off on April 1. As another example, one group of fields appears if the user is using a mobile device (such as a smart phone), and a different set of fields appears if the user is not on a mobile device.
$deviceConfiguration = 'Smart Phones'
not($deviceConfiguration = 'Smart Phones')
$currentDate >= '2011-01-01'
$userId != '0'
Use xpath to build the expression. For example, $deviceConfiguration = 'Smart Phones'
. You can click View Data as Index () to see the configuration's xpath structure.
NOTE: Developers can modify the examples by editing this file: workarea/ContentDesigner/ConditionalExamples.xml
.
The expression looks like this: $deviceConfiguration = 'Smart Phones'
Every Smart Form has a packaged XSLT, which is a default XSLT created from the configuration’s display information. To modify the Smart Form’s appearance:
.xslt
extension to your site root/xmlfiles
folder. You can edit the custom XSLT at any time. The changes immediately affect the appearance of the Smart Form on your Web site. So, the XSLT is quite different from other aspects of the Smart Form configuration, which generally cannot be edited for existing content.
To view a Smart Form's XSLT, click (). The View XSLT screen appears. You can use this information to create your display XSLT.
If you break inheritance on the Smart Forms tab of a folder properties screen, you can select the Smart Forms to be assigned to content in the folder.
See also: