tags:

views:

769

answers:

3

hi, how to add new option and the value is none on smarty?

        <select>
        {foreach from=$miles item=row1}
        {html_options values=$row1.milestone_id output=$row1.title}
        {/foreach}
        </select>
A: 

It's just plain HTML, you don't need any Smarty formatting:

<select>
  <option value='null'>none</option>
  {foreach from=$miles item=row1}
    {html_options values=$row1.milestone_id output=$row1.title}
  {/foreach}
</select>
Jojo
A: 

i think i just found.

        <select name="1">
        <option value='0'>-- none --</option>
        {foreach from=$miles item=row1}
        {html_options values=$row1.milestone_id output=$row1.title}
        {/foreach}
        </select>
nuclearmaker
A: 

does anyone kows how to have selected multiple filed in a select box with smarty. I know how to have selected one option but not many.

gurdji