Setting default value fo combobox on ez publish template

Author Message

sean foley

Friday 31 July 2009 7:30:46 am

I am trying to set the default value of the combo box which contains Country states,
when I set the template variable for states it doesnt show up on the template the user has to select the state each time they edit there contact details
can someone give an example please
this is how my combo box is initialized on the template

state" |i18n("design/standard/user")} select name="States"><option value="">Select state...</option>{foreach ezini('STATES', 'State', 'oagdata.ini') as $index => $state}<option value="{$index}">{$state}</option>{/foreach}</select></pre>

and on my Moduleview for contact details I set the variable for states into the template

$tpl->setVariable( 'state', $tplState);

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.