Transforming a Rich Text field from a Lotus Notes form to Infopath

Transforming a simple text field from a Notes form to an InfoPath form is relatively easy. So how do I take a Notes Rich Text field and transform it into a InfoPath Rich Text field? Also, how do I ensure it will work on a web form? This is not so easy and it may not always work if the Notes Rich Text field contains embedded objects or file attachments. But let’s just look at the design for now.

The design of a rich text field in a Lotus Notes form appears as follows:

Rich Text Field Design

Rich Text Field Design




The design details of the same rich text field (with the label) appear in the DXL file as follows:

<run><font size=’12pt’ style=’bold’ name=’Segoe UI’ pitch=’variable’
 truetype=’true’ familyid=’20’/>Detailed description:</run>

<run><font size=’12pt’ name=’Segoe UI’ pitch=’variable’
 truetype=’true’ familyid=’20’/>
<field type=’richtext’ kind=’editable’ name=’Details’/></par>


A Rich Text field in the InfoPath Designer class appears as follows:

Rich Text Field in InfoPath Designer Client

Rich Text Field in InfoPath Designer Client





You can right-click on the field and select Properties to view the settings for the field. The Display tab indicates that “Only full rich text without embedded images is supported in browser-enabled form templates.” So this will be a problem for any rich text fields in Lotus Notes documents that have embedded images.

Rich Text Box Properties

Rich Text Box Properties
















It is not as easy to define the Rich Text field in InfoPath. There are multiple files that must be updated:

view1.xsl: This defines how the field will be displayed in the form

<div align=”left”>
 <font style=”FONT-WEIGHT: bold” size=”3″>Detailed description:</font>
<div align=”left”>
 <font size=”3″></font>
 <span class=”xdRichTextBox” hideFocus=”1″ title=”Details” contentEditable=”true” xd:binding=”my:Details” tabIndex=”0″ xd:xctname=”RichText” xd:CtrlId=”CTRL12″ style=”OVERFLOW-X: visible; WIDTH: 100%; WHITE-SPACE: normal; HEIGHT: 50px”>
  <xsl:copy-of select=”my:Details/node()”/>

myschema.xml: controls the schema reference

<xsd:element name=”myFields”>
   <xsd:element ref=”my:Details” minOccurs=”0″/>
  <xsd:anyAttribute processContents=”lax” namespace=””/>
 <xsd:element name=”Details”>
  <xsd:complexType mixed=”true”>
    <xsd:any minOccurs=”0″ maxOccurs=”unbounded” namespace=”” processContents=”lax”/>

 sampledata.xml: specifies the default values that should be displayed to the user when first loading the InfoPath form

 <my:myFields xmlns:my=”” xmlns:xd=”“>
 <xd:SchemaInfo LocalName=”myFields” NamespaceURI=”“>
   <xd:Namespace LocalName=”myFields” NamespaceURI=”″/>

manifest.xsf: include a reference to the View file and special editing settings

 <xsf:views default=”View 1″>
  <xsf:view name=”View 1″ caption=”View 1″>
    <xsf:xmlToEdit name=”Details_1″ item=”/my:myFields/my:Details”>
     <xsf:editWith type=”rich” autoComplete=”no” component=”xField” proofing=”no”></xsf:editWith>
   <xsf:mainpane transform=”view1.xsl”></xsf:mainpane>

See for more details on the architecture of the InfoPath Template (XSN).

I have not even given attention to adding columns to display the data yet. But you should get the impression that automating the transformation of a field is a bit complex; especially if you want it to display properly in a web form.