I'm having a beastly time adding a rich text box to my form. We have a
schema for the form that I don't want to change and I need to have a rich
text box to show some specially formatted text, but I can't figure out how to
add the box to the form. I figured a secondary data source in the form of a
flat xml file would be the ticket but I have no idea what the xml for a data
source that could be bound to a rich text box would have. I tried creating a
dummy form in infopath with a rich text box, exporting the form files, and
then creating secondary data sources from all of the resulting xml files, but
I couldn't bind the box to any of them. This data source is a total hack
because I just need to display some formatted text based on user input but
it's the best I can come up with. Any suggestions?
Thanks in advance,
Bill
Andy - 25 Feb 2005 22:33 GMT
BillT,
I submitted a similar question yesterday. There are some posts dealing with
rich text, but they don't seem to shed much light. There are obvious
limitations, but it would be nice to have a link or message that concisely
explains what can be done with Rich Text imports.
> I'm having a beastly time adding a rich text box to my form. We have a
> schema for the form that I don't want to change and I need to have a rich
[quoted text clipped - 10 lines]
> Thanks in advance,
> Bill
Greg Collins [InfoPath MVP] - 28 Feb 2005 19:03 GMT
The problem is not with your XML. XML is simply a storage medium. The problem is with your schema (which you do not want to change). Rich text boxes expect a very specific schema structure. Without it you cannot bind a rich text box to a field.
If you created a secondary data source, and added it to your form, then InfoPath autogenerated a schema for you. InfoPath always assigns the xsd:string data type to autogenerated schemas for secondary data sources. You will need to manaully modify either your main schema or your secondary schema to support a rich text box.
If you need to know the schema structure, create a new blank form, add a rich text box to the view, and then extract the form files too see what the schema structure looks like.
Hope this helps!

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
I'm having a beastly time adding a rich text box to my form. We have a
schema for the form that I don't want to change and I need to have a rich
text box to show some specially formatted text, but I can't figure out how to
add the box to the form. I figured a secondary data source in the form of a
flat xml file would be the ticket but I have no idea what the xml for a data
source that could be bound to a rich text box would have. I tried creating a
dummy form in infopath with a rich text box, exporting the form files, and
then creating secondary data sources from all of the resulting xml files, but
I couldn't bind the box to any of them. This data source is a total hack
because I just need to display some formatted text based on user input but
it's the best I can come up with. Any suggestions?
Thanks in advance,
Bill