|
|
Rank: Advanced Member
Joined: 4/21/2011 Posts: 30 Points: 90
|
I added 3 checkbox controls to a form, they are used to filter dropdown controls also on the form. I need the form to submit whenever any checkbox is changed. I added the code below to the checkbox ListItemStyle in the ListStyles.xml file. The form submits as I would like BUT... all the checkbox values are "on" after the submit even though some had been set to the value "off". What needs to be done to capture the checkbox controls actual values?
<xsl:if test="Properties/Property[@name='ClickAction']"> <xsl:attribute name="onclick"> <xsl:text>handleClick(this</xsl:text> <xsl:if test="Properties/Property[@name='FormSubmit']"> <xsl:text>,true</xsl:text> </xsl:if> <xsl:text>);</xsl:text> </xsl:attribute> <xsl:attribute name="click-action"> <xsl:value-of select="Properties/Property[@name='ClickAction']"/> </xsl:attribute> <xsl:attribute name="confirm"> <xsl:value-of select="Properties/Property[@name='Confirm']"/> </xsl:attribute> <xsl:attribute name="forcesubmit"> <xsl:choose> <xsl:when test="Properties/Property[@name='ForcePostback']"> <xsl:value-of select="Properties/Property[@name='ForcePostback']"/> </xsl:when> <xsl:otherwise>false</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="slide-dir"> <xsl:value-of select="Properties/Property[@name='SlideDirection']"/> </xsl:attribute> <xsl:attribute name="includelocation"> <xsl:value-of select="Properties/Property[@name='IncludeLocation']"/> </xsl:attribute> </xsl:if>
|
|
 Rank: ME Staff
Joined: 1/12/2009 Posts: 279 Points: 408 Location: VA
|
The value in EntreeScope.FormProperties[ID] is always "on"? Or all of the checkboxes come back checked after the request?
|
|
Rank: Advanced Member
Joined: 4/21/2011 Posts: 30 Points: 90
|
The EntreeScope.FormProperties[ID] values is ALWAYS = "on"; The checkboxes themselves display the correct checkmark but the value is always on so I have no way of determining the actual state of the checkboxes.
|
|
 Rank: ME Staff
Joined: 1/12/2009 Posts: 279 Points: 408 Location: VA
|
The FormProperty will only exist if the checkbox is checked. So, you are correct that it is only "On" when it exists, but if it doesn't exist you have to assume it is not checked. This is a result of the Form submit from HTML only capturing checkboxes (and radio buttons) that are checked.
|
|
Rank: Advanced Member
Joined: 4/21/2011 Posts: 30 Points: 90
|
Well that is NOT what I am seeing. If I uncheck all the checkboxes on the form then when the form submits I see all 3 checkboxes in the EntreeScope.FormProperties. In other words they all exist with values = "on".
|
|
|
Guest |