开发者

Pass form data from block to a page view in Drupal

I am using the location module and views module for a postcode search, which works fine in a page display using views.

However I want the user to be able to enter their postcode into a block on the homepage and clicking submit my module sends them to the page created in views and the postcode is set as a session S_SESSION['postcode'] before sending to this page, next I want the location page to load but using the session to display the locations automatically.

Any ideas I am using hook_form_submit() and inside that declaring the $form_state as a session and then using $form_state['redirect'] to sen开发者_Python百科t to the views page path.


Ok the way to do this, is to create a mini panel and assign the view to that mini panel and then select the submit handler to go to the views page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜