How do I filter dynamically by select box?
This is an open discussion with 1 reply, filed under General.
Search
if i understand you correctly, you want the user on the front end to choose a value in a select box and submit the form to a page which will contain a data source that is filtered by the value of that select box?
one way of achieving this, though there are perhaps better, is to create a simple form with a select box and rather than method="post"
in your <form>
tag, try
<form method="get" action="{$root}/filtering-page/">
using the GET
method, you can then filter your datasource by the get parameter with the name of $url-myselectbox
where myselectbox
is the name attribute of your dropdown.
hope this helps, feel free to ask for clarification if i'm off base on what you're asking or if after reading through the above link you're still puzzled.
Create an account or sign in to comment.
Hi guys,
I'm new to symphony, but am getting used to the system. I have figured out how to make dynamic URLs by filtering my a text field.
Is it possible to create a select box with predefined values and then filter dynamically by the value selected? Rather than choosing a specific value to filter by?
Cheers for the help!
RJP1