For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > March 2006 > Empty element for html_options









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Empty element for html_options
Wojciech Duda

2006-03-21, 10:07 pm

Hi,

I'm on my first project using Smarty and have been wondering:

html_select_date has the option of having an empty option selected when
first opening a page.
I would like to have the same when using html_options. However I do
understand how to use this:

<select name="type_id">
<option value='null'>-- none --</option>
{html_options name=type options=$cust_options selected=$type_id}
</select>


This will give me two select tags, one inside the other am I right? Does not
seem easy to work with.

Any suggestions?


Thanks for your help.

Wojciech Duda
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com