I’m editing a custom table using eForm which is populated from a databasie as described on MODx wiki
http://wiki.modxcms.com/index.php/Populate_eform_with_dynamic_data.
Everything appears to be working fine except eForm is ignoring the ’selected’ command on the drop-down lists and instead always shows the first item in the list, in the below example ’none’.
<label for="county" >County</label>
<select name="county" >
<option value="1">none</option>
<option value="2">Avon</option>
<option value="3" selected > Bedfordshire</option>
<option value="4">Berkshire</option>
</select>
If I test the above code with Dreamweaver it works fine. In MODx I’ve disabled PHx and the page has been tested both cached and uncached. I’ve also tried variations including
’selected’ and
selected=’selected’. I’m sure there is a simple solution but I’ve yet to find it. Anyone?
Update: Finally figured it out, this works: selected="selected"