|
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 |
kaas Smarty Rookie
Joined: 05 Feb 2009 Posts: 13
|
Posted: Wed May 20, 2009 8:06 am Post subject: renseigner une liste select à partir d'une source XML |
|
|
Bonjour,
J'ai un souci qui est celui de renseigner une liste select à partir d'une source XML.
Voilà ce que je fais sans succès. s'il vous plait dites moi si cela a un sens ou pas :
Code: |
<td colspan="3" >
{foreach from=$smarty_xml_file item=ressource}
<select id="ressource" name="ressource" />
</option value=""></option>
{html_options values=$smarty_xml_file output=$ressource->nomtable}
</select>
{/foreach}
</td>
|
|
|
Back to top |
|
kaas Smarty Rookie
Joined: 05 Feb 2009 Posts: 13
|
Posted: Fri May 22, 2009 8:56 am Post subject: |
|
|
j'ai trouvé une solution et c'est celle là :
Code: |
td colspan="3" >
<select id="ressource" name="ressource" >
{foreach from=$smarty_xml_file item=ressource}<option>{$ressource->table}</option>{/foreach}
</select>
</td>
|
|
|
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
|