|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
alarconcepts Smarty Rookie
Joined: 28 May 2005 Posts: 18 Location: NY
|
Posted: Sat May 28, 2005 8:02 pm Post subject: html_options - Can I do this?? |
|
|
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 |
|
joey Smarty Regular
Joined: 29 Oct 2003 Posts: 57
|
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue May 31, 2005 4:42 pm Post subject: |
|
|
{html_options} won't support this specialized behavior, you will have to build this yourself with a {section} or {foreach} loop. |
|
Back to top |
|
|
|
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
|