no <P>, </P> tags in infopath SP1 output :(

J

Jason Shohet

Here's output from an infopath xml file:

<class_desc>Friends, Romans, Countrymen. Lend me your ears. I come to bury
Caesar, not to praise him. The evil that men do lives after them. But the
good is often interred in their bones. So is it with Caesar.</class_desc>

But in Infopath, I put a carriage return after "priase him". I'm using the
latest Service Pack version of infopath that I downloaded off the MS site.
Without tags properly showing up, the tool is useless to my users...

Also, I notice, the formating bar isn't enabled -- I can't bold things etc.
TY for any help

Jason Shohet
 
B

Brian Teutsch [MSFT]

It appears that you are using a Plain Text Field with Line Breaks turned on.
That stores only a \r\n into the data, not any XHTML tags.If you want your
users to be able to create formatted text, including <DIV> for paragraphs,
you should drop a Rich Text Box into the view.

Thanks,
Brian
 
J

Jason Shohet

Brian
We're using a repeating section w/ controls... & it automatically populates
w/ regular textboxes. When we try to replace one w/ a rich text box, we get
"Rich Text Box must be bound to a non-repeating field with a rich-text-box
datatype". Brian we have no idea what this means.... We're just stupid
drag-and-drop kind of people with Infopath here :)

Jason Shohet
 
B

Brian Teutsch [MSFT]

If all you know is drag-and-drop, just drop a Rich Text Box control into
your repeating section. ;) One question to clarify, it sounds like you may
already have a schema you're using. That's why the repeating section is
pre-populated with plain text.

If you are creating a schema within InfoPath, you can change the data type
of one of your fields via the Data Source task pane. That will let you do
the change to operation that is currently failing.

However, if you started from a schema that has only plain text fields in it,
you'll have to update that shema to allow XHTML fields. That's not harrd,
but it is beyond drag and drop.

Brian
 
J

Jason Shohet

OK Brian... I'm holding back, I'm more than a drag-and-dropper. I'm a
coder too... just a lazy one :)
And you guess right, we've got a schema already. How can we get it to allow
xhtml fields, so we can drop those rich-text-controls in the repeating
section?

TY very much !!
 
B

Brian Teutsch [MSFT]

I think there's a lot of virtue in being a lazy programmer, though I'm
certainly not the first with that claim.

If you created the schema within InfoPath, you can just use the Data Source
task pane to change the node type. If you want to change the schema
directly, here is what nodes that store XHTML should look like:
<xsd:element name="field1">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded"
namespace="http://www.w3.org/1999/xhtml" processContents="lax"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

You can 1) use File->Extract Form Files when you're designing to get at the
schema inside the InfoPath form. Then you can use File->Publish to get the
form back as a single XSN file.

Or, 2) Change the original schema and then do Tools->Convert Main Data
Source using SP1.

Brian
 
J

Jason Shohet

Thanks Brian, got it working thanks to u.
In InfoPath we went to DataSource, clicked on the field, property & then
change the tye from Text to Rich Text. IMO, anytime Infopath sees a XML
file without the xhtml namespace, some guy that looks like Balmer should
popup (got this idea from MS Word's interactive help), and say,

"Infopath suggests that you allow xhtml in your XML schema so that text
formatting will work properly. Can we do this for you now?"

Because it seems, why would anybody NOT want xhtml... they're going to run
into problems as soon as they start using carriage returns in a value for a
field :)

thanks again
 
Top