Form Controls
HTML Form Framework
Closed#1: Select Boxes lose post-back value
Looks like the if
statement on line 718 should refer to the $postback-value
directly, like so:
<xsl:if test="($event and $option-value=$postback-value) or (not($event) and $option-value=exsl:node-set($initial-value)/*)"> <xsl:attribute name="selected"><xsl:text>selected</xsl:text></xsl:attribute> </xsl:if>
Thanks for spotting this, Lewis. It needs to check both the string value and check by converting to a nodset for when the result of form:postback-value
contains a <value>
element. Have made an update, so see if this works please :-)
Thanks Nick, it looks like that solves the problem.
This issue is closed.
It appears that if a select box has the section parameter set, then the post-back value is not selected when a form is submitted with errors. Instead it defaults to the first one, as if a option was never selected.
This behavior does not occur with other forms that do not utilize the section parameter.