Posted by monti on December 21, 2009 at 5:13pm
I'd like to let the user select a value from a dropdown list and have the selected value passed as an argument to a view, to be embedded on the same page of the dropdown. Later, the user should be able to select another value ans get another set of results.
I cannot use the url to pass the argument. any ideas ?
Thanks !
Comments
I can see solution in 2 ways.
I can see solution in 2 ways. one by using Views bulk operations module. another way is by using views_embed_view function from views api.
thanks! my question is how to pass the variable
I have recently learnt of and used views_embed_view for another case, where the argument for the view was not related to user's input.
Here I need the user to select a value, while the page is already rendered and displayed on her browser. The question is how to get an input from the user and recreate the page using this value with iews_embed_view or any other method.
Here is what I would
Here is what I would try:
Views can display the "Summary" view based on an argument - for example, if your argument is taxonomy terms, you will get a UL of the terms. When you click on one, the argument gets selected.
You can also specify views to use an Ajax pager - I don't know if that means this is just a two-step process, but I would use a summary view for the "drop-down list".
I've done some views-ajax stuff before - DM me and I might be able to dig up some code for you.
Ryan Price
DrupalEasy Podcast