I would actually use JavaScript, since all pages could be on tabs allowing the user to return to previous pages. It would also allow validating each page when the user switches tabs to the subsequesnt page.
Barring that, rather then FormIt, I think I'd use a single snippet that saved the relevant fields and an indicator of which page ('form_page') the user was on in $_SESSION variables. Then I'd put the forms for each page in separate chunks. Be sure to put the snippet tag at the top of each chunk and make the form action the current page.
if (! isset($_SESSION['form_page'') {
$output = $modx->getChunk('form_page_1');
} else {
switch($_SESSION['form_page']) {
case 'page_1':
/* save the session variables from the $_POST */
$SESSION[form_page] = 'page_2';
$output = $modx->getChunk('form_page_2');
case page_2:
/* Get any variables that need to be passed on from the $_SESSION */
/* Save the session variables from the $_POST + the $_SESSION ones collected above */
$SESSION[form_page] = 'page_3';
output = $modx->getChunk('form_page_3');
// etc.
}
return $output;
This will get very hairy if you want to let users return to the previous pages or need to validate each page.
On reflection, FormIt might work better for this since you could use hooks and preHooks to help with moving between pages.
OR: There are a
lot of packages out there that are made for exactly this purpose, though I've never used any of them.