|
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 |
grahama Smarty Rookie
Joined: 29 Mar 2005 Posts: 5
|
Posted: Fri Dec 19, 2008 12:38 am Post subject: Appending a url to a value in html_options |
|
|
Using html_options, How can I append a url string to the 'value' parameter where:
value="1" becomes value =" ./myscript.php?id=1"
Is this possible with html_options?
I am new to Smarty so any help is appreciated.
{html_options name=menu options=$menu selected=$selected}
With the above, I am currently generating.
<select name="menu">
<option label="Option1" value="1">Option1</option>
<option label="Option2" value="2" selected="selected">Option2</option>
<option label="Option3" value="3">Option3</option>
</select>
many thanks in advance |
|
Back to top |
|
Celeb Administrator
Joined: 17 Apr 2007 Posts: 1025 Location: Vienna
|
Posted: Mon Dec 29, 2008 8:49 am Post subject: |
|
|
You either have to modify your $menu array to already contain the values you want, or create a modifier that modifies your array the way you want it or just prepend it in the PHP file processing the submitted form. _________________ Darn computers always do what I tell them to instead of what I want them to do. |
|
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
|