• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Difference between selectedvalue and items in InputDropdown
PostPosted: Thu Dec 15, 2011 2:18 pm 
Offline
Forum Members
Forum Members

Joined: Fri Sep 30, 2011 2:28 pm
Posts: 15
Location: Nieuw-Lekkerland, The Netherlands
I have a product list page with filters for a couple of fields. One of the filters has values like '> 1', '< 1'. This will not work when you use the InputDropdown method. The select box shows up, but the option, when selected, will not have the selected="selected" attribute.

I was curious why so i tried to investigate it. The function InputDropdown goes to cms_module_CreateInputDropdown(). The html for the select box is build here. The selectedvalue field is filtered with the function cms_htmlentities(). So '>' turns into '&gt;'. I can see why this is done. The problem however, this is not done for the value itself. So '>' stays '>'. So the equation $selectedvalue == $value will be '&gt;' == '>' and this will never be true.

And to keep it more strange. There is a line before that says:
Code:
//$value = cms_htmlentities($value);

Yes with comments. Why is this line not uncommented? Because when i do, it works..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


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 post attachments in this forum

Search for:
Jump to:  
A2 Hosting