Advice on chaining together forms

Hello all!

I’m hoping someone can help with a multi-step form question.

(I realize Sparkle is not built for this and is a custom request.)

I want to chain together the form into multiple steps.

Step 1:

  • enter your zip code
  • enter your first name
  • SUBMIT (advanced form) goes to step-2.php as POST

Step 2:

  • enter your address
  • HIDDEN zip code from previous form
  • HIDDEN first name from previous form
  • SUBMIT (email form) goes to thank-you.php

So, I want to gather the data from step 1 and pass it into step 2, then further submit it to the final email form as hidden variables.

Any advice?

Thanks in advance!

Chris

@WebRoyal, Got to be honest with you… I haven’t come across something like that before. I would imagine there would be a bit of PHP needed to make that work.

Why do you need a completed form to populate a second form?

For conversion optimization, I break forms into a two step funnel.

Usually I put:

<?=$_POST['zip_code']?>

… into a hidden field on the form on step 2 to accomplish this, but I can’t do it with Sparkle unfortunately. (Sparkle hidden fields won’t accept PHP code injections.)

@WebRoyal, Ok got it. Sorry I can’t be of help, but thank you for sharing! :slight_smile:

1 Like

@WebRoyal
That’s right, you would need PHP. I was seeing an attempt to doing it in JavaScript, it worked okay but was very messy in Sparkle.