[support] D7 Multistep Form with Pager

Carl Wiedemann carl.wiedemann at gmail.com
Fri May 27 19:32:32 UTC 2011


You also might into using Ctools object caching (or even the Ctools form
wizard API) to assist with temporary caching.
http://drupal.org/project/ctools


On Fri, May 27, 2011 at 9:25 AM, Fred Jones <fredthejonester at gmail.com>wrote:

> I have a custom module with a form and it works fine with multistep--I
> found a tutorial somewhere how to do that.
>
> But I need it to be filtered by the user and paged. Just like the
> admin/content page we all know and love.
>
> I see that the pager links do not contain the filter settings--they
> are just ?page=7 etc. I found in node.admin.inc that the filters are
> kept constant by inserting them into $_SESSION and then referencing
> them later.
>
> Is that the way to do it? I'm confused because in D6 my pager links
> would end with :
>
> ?page=4&begin_date[month]=5&begin_date[day]=27&begin_date[year]=1993 etc.
>
> IE the filter settings were in the URL. Is there something I am
> missing to get that to work?
>
> While I'm here I will mention that in D6 I used this:
>
>
>  $form['searchparams']['begin_date'] = array(
>    '#type' => 'date',
>    '#title' => 'Begin Date',
>    '#default_value' => $form['post']['begin_date']
>  );
>
> to get my filters to remain after the submit. I changed one line:
>
>    '#default_value' => $form_state['input']['end_date'],
>
> for D7 and it works. Is that the right way?
>
> Any light you can shed on this topic is appreciated. I have been
> Googling and reading but a push in the right direction would
> help--this is my first foray into D7 FAPI. :)
>
> Thanks!
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110527/d3eadd02/attachment-0001.html 


More information about the support mailing list