Compile Large multi page forms and submit

NickOg 08 Oct, 2013
Hi Bob,
Just hit something that I has had me thinking.
My site includes some 750 members who book on a selection of about 60 courses.

The first part is easy. For any single member I can list all of the courses on a single page, click the ones they want and submit.

But the other way round - for a single course listing 750 members on a single page is a bit over the top! I added the pagination control but the problem there is as you scroll from page 1 to page 2 or whatever then any selections from one page are lost when you move to the next.
[attachment=0]4BobG.jpg[/attachment]

Is there some way around that? Or is a better option to use a multi-page control- filling a variable number of pages from a multi-record db read and using a submit on a final page? Will that hold the previously selected members? Would that work?

I will try it and see but a quick check with you may save me a lot of time. 😀

Regards

Nick
GreyHead 08 Oct, 2013
Hi NickOg,

I'm not sure. Thinking about it, I'd probably write JavaScript to save the selection somehow and preserve it through the page transition. I did something vaguely similar recently where we used JavaScript to add the ids of selections to the page url as 87|94|123|. . . You can do this as the checkboxes are clicked or unclicked; then when the form is submitted (or repaged) save the selection to the User Session merging with any existing selection.

If you the re-load the selection into the $form->data array when the page is re-loaded any preciously selected boxes should be re-checked.

Note: this is a quick description of a process that should work but needs careful thinking through!

Bob
NickOg 08 Oct, 2013
Hmmm. Well I do enjoy a challenge. Will have a ponder...

Thanks for the pointer

Nick
This topic is locked and no more replies can be posted.