Re: Multipage form redux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 Jul 2005, at 21:22, Jack Jackson wrote:


Right. Except I would rather have it working in a session because I specifically do not want to have the form sending $_POST data back and forth to the browser six times for several reasons. SO I'd like to

Page1 // User enters first batch of data, presses SUBMIT at bottom. Data is cleaned and written to SESSION, user passed to Page2

repeat as necessary to last page. At last page, process and error check newest input, then commit it, plus all previously stored session info to db.


As has also been said, Javascript can do this really nicely. The best example I've seen of this is in Mambo's (a popular PHP CMS) admin interface. It uses a tabbed multi-page form with client-side validation. It's really just one big page, so if the user has JS turned off, they will get one big form with no client-side validation, but it will still work. It's a really elegant way of working. It doesn't require any server interaction between pages - nothing is submitted until the form is complete.

See here for a howto: http://www.devx.com/webdev/Article/10483/1763/ page/1

Admittedly this approach doesn't easily allow to you abandon and resume later (unless you get clever with JS and cookies).

For keeping data in a session, you could combine this approach with Ajax: http://particletree.com/features/smart-validation-with-ajax

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@xxxxxxxxxxxxxxxxxx | http://www.synchromedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux