cfselect preserve selected value on back
We are on CF9. I have a form that has multiple bound cfselect fields. If I submit the form and then go back using the browser's back button, all the bound cfselect fields are set back to their initial state. I have tried used preserveData = "yes" in eth cfform tag and set selected to the field name but this does not seem to work.
Is there a way to achieve this? Thanks.
Example code:
<cfform id="form1" name="form1" action="majormarketAction.cfm?action=AddRecord" preserveData="yes" method="post">
<table border="0" cellpadding="4" cellspacing="0" width="480" align="center" class="FormTable">
<tr>
<td style="padding-left:8px;" width="25%" valign="top"><strong>Market</strong><br />
<cfselect name="thisMarketID"
id="thisMarketID"
bind="cfc:/COM/majormarket.getMarketsRemote()"
display="MarketLabel"
value="MarketID"
bindonload="true"
selected="thisMarketID"
class="formText" />
</td>
<td valign="top" colspan="2"><strong>Customer</strong><br />
<cfselect name="CustomerID"
id="CustomerID"
bind="cfc:/COM/majormarket.getCustByMarketRemote({thisMarketID})"
display="CustName"
value="CustomerID"
class="formText"
selected="CustomerID"
style="width:320px;" />
</td>
</tr>