Hi All,
Im converting some HTML forms into infopath forms for
using with sharepoint. I want to know why the below piece of code is
behaving differently in Infopath and Browser. Im pasting a portion of
view.xsl file below.
-------------------------------------------------------------------------
<input class="xdBehavior_Boolean" title="" type="radio"
name="{generate-id(my:DC000c_1_R)}" tabIndex="0" xd:CtrlId="CTRL1"
xd:xctname="OptionButton" xd:onValue="DC000c_C005"
xd:boundProp="xd:value" xd:binding="my:DC000c_1_R">
<xsl:choose>
<xsl:when test="1 = 1 ">
<xsl:attribute name="style" >border:1px solid red ;</xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:attribute name="xd:value">
<xsl:value-of select="my:DC000c_1_R" />
</xsl:attribute>
<xsl:if test="my:DC000c_1_R="DC000c_C005"">
<xsl:attribute name="CHECKED">CHECKED</xsl:attribute>
</xsl:if>
</input>
<span class="xdTextBox" hideFocus="1" title="" tabIndex="0"
xd:CtrlId="CTRL1" xd:xctname="plaintext" xd:binding="my:DC000c_T006"
style="FONT-SIZE: 10pt; WIDTH: 100%; COLOR: #000000; FONT-FAMILY:
Verdana">
<xsl:choose>
<xsl:when test="../my:myFields_0/my:DC000c_1_R != 'DC000c_C005 '">
<xsl:attribute name="style ">border:1px solid red; </xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:value-of select="my:DC000c_T006"/>
</span>
-------------------------------------------------------------------------
The intended behaviour and what Infopath produces is:
1) First radio button will have a red border always (as the test condition is "1 = 1" so always true)
2) The textBox have a red border and will disappear when the radio is checked.
When Viewed in browser (Both Firefox and IE)
1) The radio is not showing the red border at all...!!!
2) The red border is always there unconditionaly...!!!
Im using MOSS 2007 with no service packs installed... Is it an issue with the Forms Services?? Or am i doing something wrong??
I know editing view.xsl is not very good idea but in this situation im
left with no choise.. I am creating the whole set of XML on the fly...
and we want this conditional highlighting for some scenarios which cant
be met by XSD schema.
Highly appretiate any comments on this behaviour...
Please note: in Infopath its all working perfect!
Thanks in advance...