Forums

Mult Page Forms - Step Navigation

padder 26 Apr, 2010
Hi,

Not sure what I've done wrong here, or if this is a common issue?

I have a multi page form, spread over 3 steps. Step 1 takes some accommodation booking details, Step 2 takes some personal details and Step 3 is a confirmation page with accept terms etc.

I fill in Step 1, and move on to Step 2, then there is a button to return to Step 1 in case you entered something wrong. This link is:

<input type="button" value="Back to Booking Details" onclick="location.href='http://www.mydomain.co.uk/reservations/index.php?option=com_chronocontact&chronoformname=personal&cfformstep=1'" />


Seems to be ok so far, press the button and you go back to Step 1 with your previously entered details present. But whatever you do from here (ie if you change any details OR just resubmit the same data) it doesn't go to Step 2, a blank Step 1 form is shown. Re-enter the data again and all is fine but that's not the idea of it!


This also happens in another situation. I have 6 x drop down boxes on Step 1, and I want them to validate so if none of the drop downs are chosen it does not allow you to proceed. To do this I've used server side validation on Step 1:

<?php
$single_rooms = JRequest::getString('single_rooms','', 'post');
$twin_rooms = JRequest::getString('twin_rooms','', 'post');
$double_rooms = JRequest::getString('double_rooms','', 'post');
$triple_rooms = JRequest::getString('triple_rooms','', 'post');
$family_rooms = JRequest::getString('family_rooms','', 'post');
$bridal_suite = JRequest::getString('bridal_suite','', 'post');
$totalrooms = $single_rooms + $twin_rooms + $double_rooms + $triple_rooms + $family_rooms + $bridal_suite;
if ( $totalrooms == 0 ) {
  return 'You have not selected any rooms! Please try again...';
}
?>


Again it all seems to work, if you don't select any number of rooms you are stuck on Step 1, the red error message is shown and the previously entered data is all still there.

But try to choose a room from here and press submit, and again it just shows the Step 1 form again with empty data.

Settings:
Form Method: Post
ChronoForms handle my posted arrays? Yes
Republish fields if error occured? Try to Republish
Republish skip list: Blank
Renew Form Instance On Submit? New Instance
Load Chronoforms CSS/JS Files? Yes
Enable Validation? Yes
Enable Server Side Validation? Yes

Anyone got any ideas what I've missed out here?

Thanks
padder 26 Apr, 2010
As usual it's something simple!

It's the Submission limit causing the problem - I had that set to 10 seconds.

As I'm zipping through the form testing it I'm retrying within a couple of seconds and it's throwing me back to an empty form. The submission limit error message is not shown for some reason (maybe because it's a multi page form) which made it unclear where the problem lay.

Lowering the submission limit to a couple of seconds should sort this out if anyone else has the problem.
This topic is locked and no more replies can be posted.