I’ve got a form which is basically this:
<form action="" method="post" id="filter">
<label for="size">Width:</label>
<select id="width" name="width">
<option selected="selected" value="any">Any</option>
{exp:query sql="SELECT DISTINCT(field_id_9) as 'tyres-width' from exp_weblog_data where weblog_id=4"}
<option value="{tyres-width}">{tyres-width}</option>
{/exp:query}
</select>
</form>You can see it in action at the top of this page here.
I’ve only included the code for just one of the select elements here as an example, but you get the idea.
What I want to do is carry on displaying the values that the user has chosen in the dropdowns on the next page (which has been POSTed to). So, if the user selected ‘Tyre Size’ of 14, then on the next page ‘14’ would still be showing in that dropdown, the same for all 4 dropdowns at once.
Has anyone any ideas? I’ve seen one or two solutions on the web but none seem to account for dynamically populated select dropdowns.
Thanks.