Archive for May 20, 2009
RichText tricks for TextField in Designer
This post describes a technique to set rich text content into a Textfield of a form that was designed in LiveCycle Designer ES. Thanks to Paul Guerette who helped me out to understand this few months back.
There can be two scenarios in which you might want to set content into a rich text supported Textfield.
- User types the rich text content into a text field and you wish to copy that to another Textfield.
- LiveCycle ES server/some other way you wish to set rich text content into a form field. (Form pre-population scenario)
Where is rich text data in a text field?
When user types plain text in a pure Textfield (field format: Plain Text Only) then the data is set/get from rawValue property. BUT if the Textfield is having Rich Text as the field format then the data is store at .value.exData
How to check what the rich text data look like under the covers?
I use email submit button on a simplest form to see the XML that gets created for submission.
If you wish to do this then:
- Create a simple dynamic PDF form and put a text field with Rich Text format set to it.
- Drop a Submit button and put mailto:someone@abc.com as submit URL
- Open this sample form in Preview mode type some text with rich-text formatting (Bold, Italics etc)
- Hit the email submit button you would be able to see the exData content as the child element of your Textfield.