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 : Sélectionner tout - Visualiser dans une fenêtre à part
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 : Sélectionner tout - Visualiser dans une fenêtre à part
<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 : Sélectionner tout - Visualiser dans une fenêtre à part
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 : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
<select name="tm_input1" size="1"><option label="&lt;font style='font-family:Arial'&gt;Arial&lt;/font&gt;" value="Arial">&lt;font style='font-family:Arial'&gt;Arial&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Tahoma'&gt;Tahoma&lt;/font&gt;" value="Tahoma">&lt;font style='font-family:Tahoma'&gt;Tahoma&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Helvetica'&gt;Helvetica&lt;/font&gt;" value="Helvetica">&lt;font style='font-family:Helvetica'&gt;Helvetica&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Verdana'&gt;Verdana&lt;/font&gt;" value="Verdana">&lt;font style='font-family:Verdana'&gt;Verdana&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Impact'&gt;Impact&lt;/font&gt;" value="Impact">&lt;font style='font-family:Impact'&gt;Impact&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Courier'&gt;Courier&lt;/font&gt;" value="Courier">&lt;font style='font-family:Courier'&gt;Courier&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Courier New'&gt;Courier New&lt;/font&gt;" value="Courier New">&lt;font style='font-family:Courier New'&gt;Courier New&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Lucida Sans'&gt;Lucida Sans&lt;/font&gt;" value="Lucida Sans">&lt;font style='font-family:Lucida Sans'&gt;Lucida Sans&lt;/font&gt;</option>
<option label="&lt;font style='font-family:Trebuchet MS'&gt;Trebuchet MS&lt;/font&gt;" value="Trebuchet MS">&lt;font style='font-family:Trebuchet MS'&gt;Trebuchet MS&lt;/font&gt;</option>
</select>
Pouvez-vous m'aider ?

Merci