Forum

Thread tagged as: Question, Addons, Forms

2-Part Form Using Perch Forms

Hi everyone

I'm trying to create a 2-part form using Perch Forms but am struggling to get the data from form 1 into form 2.

Normally the easiest way is to include the info within the URL string but I can't seem to be able to do this. I've added /thankyou.php?name={name} in the on success box in the form app but it doesn't put the name field data into the string.

I hope that made sense?

Many thanks

Glen Piggott

Glen Piggott 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you add hidden fields to form 2 for the fields in form 1, then submitting one to the other should fill out the hidden fields. It's matched on IDs.

Thanks Drew

Sorry, it's been a very long week!

I've got the following on the second form but the value isn't being populated...

<perch:input type="hidden" id="name" label="Full Name" value="<perch:form id="name" />" />

The input IDs match, does the form ID need to match too?

Does the URL of the 2nd form need to be set in the 1st forms action="" rather than in the On Success box in the app?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, the first form needs to submit to the URL of the second.

Boom!

Thanks as always Drew