[Smarty] html_select et balise html font
Bonjour,
Un petit souci technique avec smarty !
Je souhaite créer une boite de sélection en utilisant html_select
Dans le fichier php
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| $smarty->assign('nom_police', array("Arial",
"Tahoma",
"Helvetica",
"Verdana",
"Impact",
"Courier",
"Courier New",
"Lucida Sans",
"Trebuchet MS"));
$smarty->assign('type_police', array("<font style='font-family:Arial'>Arial</font>",
"<font style='font-family:Tahoma'>Tahoma</font>",
"<font style='font-family:Helvetica'>Helvetica</font>",
"<font style='font-family:Verdana'>Verdana</font>",
"<font style='font-family:Impact'>Impact</font>",
"<font style='font-family:Courier'>Courier</font>",
"<font style='font-family:Courier New'>Courier New</font>",
"<font style='font-family:Lucida Sans'>Lucida Sans</font>",
"<font style='font-family:Trebuchet MS'>Trebuchet MS</font>")); |
Dans le fichier tpl
Code:
<select name="tm_input1" size="1">{html_options values=$nom_police output=$type_police}</select>
Mais la boite de sélection m'affiche un résultat du type:
Code:
1 2 3
| ...
<font style='font-family:Lucida Sans'>Lucida Sans</font>
... |
alors que je désire obtenir une liste des polices écrites dans leur propre police !
Le code html ainsi créé est :
Code:
1 2 3 4 5 6 7 8 9 10
| <select name="tm_input1" size="1"><option label="<font style='font-family:Arial'>Arial</font>" value="Arial"><font style='font-family:Arial'>Arial</font></option>
<option label="<font style='font-family:Tahoma'>Tahoma</font>" value="Tahoma"><font style='font-family:Tahoma'>Tahoma</font></option>
<option label="<font style='font-family:Helvetica'>Helvetica</font>" value="Helvetica"><font style='font-family:Helvetica'>Helvetica</font></option>
<option label="<font style='font-family:Verdana'>Verdana</font>" value="Verdana"><font style='font-family:Verdana'>Verdana</font></option>
<option label="<font style='font-family:Impact'>Impact</font>" value="Impact"><font style='font-family:Impact'>Impact</font></option>
<option label="<font style='font-family:Courier'>Courier</font>" value="Courier"><font style='font-family:Courier'>Courier</font></option>
<option label="<font style='font-family:Courier New'>Courier New</font>" value="Courier New"><font style='font-family:Courier New'>Courier New</font></option>
<option label="<font style='font-family:Lucida Sans'>Lucida Sans</font>" value="Lucida Sans"><font style='font-family:Lucida Sans'>Lucida Sans</font></option>
<option label="<font style='font-family:Trebuchet MS'>Trebuchet MS</font>" value="Trebuchet MS"><font style='font-family:Trebuchet MS'>Trebuchet MS</font></option>
</select> |
Pouvez-vous m'aider ?
Merci