try doing this.. {if $clearance eq 0} instead use == i saw that some version of smarty has a bug related to this issue BTW .. you could use the options helper [1] saludos gabriel [1] http://www.smarty.net/manual/en/language.function.html.options.php On Wed, May 28, 2008 at 11:46 AM, George Pitcher <george.pitcher@xxxxxxxxxxx> wrote: > Hi, > > Apologies for posting this here but coudn't find a decent Smarty list. > > I've been using Smarty for 4 years without much problem. I'm adding some > extra functionality to a page used by 2 members of staff. My snippets of > relevant code are: > > $smarty->assign('clearance', $clearbits['clearance_alt']); > > <td align="right" class="s9">Clearance {$clearance}</td> > <td class="s9"> </td> > <td bgcolor="aliceblue"><select class="formInputText" id="clearance_alt" > name="clearance_alt"> > <option value=0{if $clearance==0} selected{/if}>Select</option> > <option value=1{if $clearance==1} selected{/if}>Yes</option> > <option value=2{if $clearance==2} selected{/if}>No</option> > <option value=3{if $clearance==3} selected{/if}>Failed</option> > </select></td> > > You will see that I have called the variable in the first column. On the web > page, this displays as "Clearance 1". I would then expect 'Yes' to appear > selected in the column three drop-down box. Unfortunately, this displays as > 'Select'. > > I have tried deleting all the cached template files as well as single and > double quotes around the 0,1,2,3 values, all to no avail. > > All the other Smarty stuff seems to be working on the site. > > Can anyone point me in the right direction? > Cheers > > George in wet and windy Edinburgh > > -- Los sabios buscan la sabiduría; los necios creen haberla encontrado. Gabriel Sosa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php