Forum
Forum
DevBlog
Forum management
Threads started by me
Threads I participate in
Get started
Dynamicweb 9
Dynamicweb 10
Swift
Templating
Community
Downloads
Login
Service Desk
Order
Sections
Get started
Dynamicweb 9
Dynamicweb 10
Swift
Templating
Community
Downloads
Forum
DevBlog
Forum management
Threads started by me
Threads I participate in
Developer forum
×
E-mail notifications
E-mail
I'd like to be informed of the updates
Don't bother me with any emails
Forum
»
Development
»
Search filters as a select box?
Search filters as a select box?
E-mail notifications
Reply
Posted on 11/02/2011 13:58:33
I had successfully implemented search filters using input tags, like in the "ProductsFieldFilter.html" example and get the filter to work.
http://dali.net.dynamicweb.dk/en-US/test-prod-catalog.aspx
But I need to use a select box instead of input tags, and thats where something goes wrong.
My code:
Color
>
Any help would be really appreciated!
Replies
Posted on 14/02/2011 08:42:02
Reply
Hello,
You can use the following template for your "Product field value" filter to render a drop-down list:
<select name="pf">
<option value="<!--@Ecom:Filters.ProductFields.Row.Value-->"
<!--@If Defined(Ecom:Filters.ProductFields.Row.Checked)-->
selected="true"
<!--EndIf(Ecom:Filters.ProductFields.Row.Checked)-->>
<!--@Ecom:Filters.ProductFields.Row.Text
<span>(<!--@Ecom:Filters.ProductFields.Row.TotalFormatted-->)</span>
</option>
</select>
Note that I've hardcoded the name of the drop-down list ("pf") instead of using the tag
<!--@Filters:Current.TagName-->
. This is because of the bug (that will be fixed as soon as possible) in this particular filter.
Hope this will help you.
-- Pavel
Posted on 15/02/2011 14:30:09
Reply
Hi Pavel
It took me a while to figure it out, but it works now!!
Thank you much!
You must be logged in to post in the forum
Login
Username
Password
Forgot your password?