|
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 |
jamgold Smarty n00b
Joined: 07 Oct 2004 Posts: 3
|
Posted: Sat Nov 20, 2004 7:21 am Post subject: html_option selected anomaly |
|
|
Hi
today I finally figured out why the html_option call did sometimes not display the correct option, according to the selected parameter.
The html_option plugin uses the in_array function to determine if an option is supposed to be selected or not.
I happen to use option values of 1.3.2.1 or 2.1.3 or 2.1 to signify tree / children dependencies.
The problem is that all 2-digit option values are being interpreted as numbers rather than strings and therefore don't achieve the desired match.
Is this really what's happening, or am I on crack? How would I best fix this, short of writing my own html_option plugin or changing the separation character of my tree structure (.)?
Thanks
Jan |
|
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
|