Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

optgroup error and problem and selected

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Enquest
Smarty Regular


Joined: 14 May 2003
Posts: 79

PostPosted: Wed Jun 18, 2003 3:45 pm    Post subject: optgroup error and problem and selected Reply with quote

I had my list without optgroups but I changed that.
Now I got a few problem even if the list shows correct.

The first is that selected won't work anymore. Thus it doesn't show selected correct it does always select the first item of a group!

Second problem I get in the html source code the following problem.
Code:
   <select name=group class="smallText">
<br />
<b>Warning</b>:  htmlspecialchars() expects parameter 1 to be string, array given in <b>/home/spa/www/html/socialisme/Smarty/plugins/shared.escape_special_chars.php</b> on line <b>11</b><br />
<optgroup label="">
<optgroup label="group 1">


Notice also the first empty optgroup. When I look at my array with print_r I don't see that I'm making an empty array.

So, how do I make sure that the selected item does work with {html_options values=$grouplist selected=$user output=$grouplist} is something wrong with this.

And what does that error state...

Thanxs
_________________
-----------------------
Learning my self by trying to help others
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jun 18, 2003 7:54 pm    Post subject: Reply with quote

html_options uses SELECTED= and it works for me.

You should really post a snippet of your template otherwise helping in the case is very difficult.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP