Pass form data from block to a page view in Drupal

Posted by abdesignuk on Stack Overflow See other posts from Stack Overflow or by abdesignuk
Published on 2010-05-21T16:51:09Z Indexed on 2010/05/21 17:30 UTC
Read the original article Hit count: 176

Filed under:
|
|
|
|

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 sent to the views page path.

© Stack Overflow or respective owner

Related posts about drupal

Related posts about views