Welcome Guest Search | Active Topics | Members | Log In | Register

Checkbox controls values on form submit Options
tcromer
Posted: Wednesday, August 31, 2011 8:59:20 AM
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>
joe
Posted: Wednesday, August 31, 2011 9:18:09 AM

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?
tcromer
Posted: Wednesday, August 31, 2011 9:20:35 AM
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.
joe
Posted: Wednesday, August 31, 2011 9:51:26 AM

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.
tcromer
Posted: Wednesday, August 31, 2011 10:39:08 AM
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".

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.