Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

html_options - Can I do this??

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
alarconcepts
Smarty Rookie


Joined: 28 May 2005
Posts: 18
Location: NY

PostPosted: Sat May 28, 2005 8:02 pm    Post subject: html_options - Can I do this?? Reply with quote

I'm creating a drop-down menu that has a list of colors. I've got an array populating the menu, but all the words are displayed in a default color. This is fine in most cases, but I'd like each color to display in it's color... ie, the word "Red" would display in red, etc... Is this possible?

<select id="AlarContact_Switch" name="Subjects[Subjects]" size="1">
<option value="default" />Default
<option style="color:black" value="black" />Black
<option style="color:blue" value="blue" />Blue
<option style="color:brown" value="brown" />Brown
<option style="color:cyan" value="cyan" />Cyan
<option style="color:darkblue" value="darkblue" />Dark Blue
<option style="color:darkred" value="darkred" />Dark Red
<option style="color:green" value="green" />Green
<option style="color:indigo" value="indigo" />Indigo
<option style="color:olive" value="olive" />Olive
<option style="color:orange" value="orange" />Orange
<option style="color:red" value="red" />Red
<option style="color:violet" value="violet" />Violet
<option style="color:white" value="white" />White
<option style="color:yellow" value="yellow" />Yellow
</select>
Back to top
View user's profile Send private message
joey
Smarty Regular


Joined: 29 Oct 2003
Posts: 57

PostPosted: Tue May 31, 2005 4:18 pm    Post subject: no. Reply with quote

You can't do that by this tag.
_________________
Joey
Senior Developer & Designer
-------------------------------------------
http://www.propagator.net
[SourceForge Project] Formcat with Smarty!
http://www.propagator.net/formcat/
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue May 31, 2005 4:42 pm    Post subject: Reply with quote

{html_options} won't support this specialized behavior, you will have to build this yourself with a {section} or {foreach} loop.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP