How to make a Two Step Contact Form

Posted by on Aug 11, 2014 in How To, Tips

How to make a Two Step Contact Form

The following video will show you how to make a Step 1, Step 2 multi-page form.

While Multi page forms are not officially supported, the method shown in this video works as long as the fields in form one are limited to just a few text fields only. Optionally the CAPTCHA in Step 1 form can be disabled on the Advanced tab, since there is already a CAPTCHA on form 2. Optionally the email sending of the Step 1 form can be disabled with a checkbox on the Advanced tab in the Redirect settings section. Also you can modify the message while Step 1 is redirecting: “Your message has been sent, thank you.” You can change this on the Labels tab of the Step 1 form. You can perhaps change it to “Continuing to Step 2…”.

Known Limitations:
You will have success if the Step 1 form only has a few text fields like Name, Email, Phone, etc. But do not add fields on Step 1 with options like Select or Radio fields. Fields with options on Step 1 will not pass properly to form 2 because it expects option number as query input. The problem is: Form 1 sends out options as value strings, but form 2 only accepts input from query options as key numbers, not value strings. Fields with options on Step 2 will be fine however.
This is a known limitation that may not ever be resolved in future updates.

2 Step form limitation problem:
While trying to pass a message field or textarea field from one form to another, you find that line breaks are removed.

I did some investigation and I found out WordPress strips line break encoding characters ‘%0D’ and ‘%0A’ from the GET URL query. I see no way to get around this when redirecting to a WordPress URL. It must be a security feature of pretty URL or something. You cannot pass a redirect query to a 2nd form and retain line breaks in a message field or text field. This issue may not show up when redirecting to a form query or API that is not part of WordPress, because the problem is not the sending of the data, it is WordPress stripping out line breaks when receiving it.

Credit to Scott Costello for making the video.

Do you need help?

Send us a Donation:

Donate to Mike Challis