<![CDATA[ help with PHx in a form ("selected" option value) - My Forums]]> https://forums.modx.com/thread/?thread=74898 <![CDATA[help with PHx in a form ("selected" option value)]]> https://forums.modx.com/thread/74898/help-with#dis-post-415263 selected="selected" to opiton values based on their value, but my code doesn't work:
            <label for="[+maxigallery.fieldnames.unit+]">units:</label> 
            <select name="[+maxigallery.fieldnames.unit+]" id="[+maxigallery.fieldnames.unit+]" value="[+maxigallery.picture.unit:htmlent+]" onkeydown="document.editform.[+maxigallery.fieldnames.modified+].value='yes'">
                <option value="mm" [+maxigallery.picture.unit:htmlent:is=`mm`:then=`selected="selected"`+]>mm</option>
                <option value="cm" [+maxigallery.picture.unit:htmlent:is=`cm`:then=`selected="selected"`+]>cm</option>
                <option value="m" [+maxigallery.picture.unit:htmlent:is=`m`:then=`selected="selected"`+]>m</option>
                <option value="variable" [+maxigallery.picture.unit:htmlent:is=`variable`:then=`selected="selected"`+]>variable</option>
            </select>

no one of the values has the attribute. Where am I wrong?
This is a template of a Maxigallery (beta) module, on evo.]]>
andrearicci Mar 08, 2012, 10:41 AM https://forums.modx.com/thread/74898/help-with#dis-post-415263