Skip to main content
Pass submission data to the thank you page is a feature for those with developer experience to display data submitted (e.g., name and email) on the thank you page by enabling this feature with custom code.
Note: Without custom coding, the data sent with this feature will not be captured to display on your page.
This feature is made possible with the After Submission settings in Forms. Learn about the Form After Submission settings. You can use this feature to autofill a second Form after the initial Form is submitted, creating a seamless user experience. After submission settings

Set up autofill Forms with custom coding

Setting up a Form to lead to another Form lets you collect a simple submission before asking more detailed questions, or have your users complete a Form before getting access to your application. This setup redirects users to an auto-filled Form after submitting the first Form. The second Form autofills their name and email by pulling the data from the first Form submission:

Before you begin

For this setup, you need two Forms and two Pages (one Form per Page). If you have already prepared your landing pages with your Forms, continue to the first step.
Tip: This feature works for Single Opt-in and Double Opt-in Forms, but does not work for Forms triggered by a Two-Step Opt-in popup.

Enable pass submission data

Enable pass submission data for the first Form your users will submit. First, enable Send the contact to a custom thank you page. Your “custom thank you page” is the second page containing the second Form:
  1. Open the Marketing tab from the Dashboard.
  2. Click Forms.
  3. Select the first Form your users will complete.
  4. Navigate to the After Submission settings.
  5. Enable Send the contact to a custom thank you page.
  6. Select the second page with your second Form from the dropdown:
Then, enable Pass submission data to the thank you page: Pass submission data setting

Add custom code to the page

Important: Introducing custom code to your site can open you up to vulnerabilities and potential malware attacks. We recommend using vulnerability tools like VirusTotal or Snyk to scan any custom code that you intend to use and apply certain best practices to help reduce potential impact.
After enabling the After Submission settings, add custom code to your second page to enable the autofill. This step varies depending on the editor used to build your pages. Select the editor used to create your page below to learn how to add the custom code:
  • Kajabi Pages
  • Premier
Copy and paste the Javascript code below to the second page containing the Form you wish to autofill:
<script>
const queryString = window.location.search; //get the URL of the page

 const urlParams = new URLSearchParams(queryString); //process the URL so you can pick out the parameters inside 

const nameParam = urlParams.get('name') //get the name parameter inside the URL 

const emailParam = urlParams.get('email') //get the email parameter inside the URL 

var name =nameParam; 
var email =emailParam; 

var x = document.getElementById("form_submission_name"); //get the Name field of the form 
x.value = name; //autofill name field with the value we got from the URL 
var y = document.getElementById("form_submission_email"); //get the Email field of the form 
y.value =email; //autofill email field with the value we got from the URL 
</script>

Kajabi Pages

With Kajabi Pages, you can add the custom code directly from your page editor. First, copy the custom code above.
Note: When copying the code, leave out the opening and closing <script> tags (i.e., <script> and </script>) if you are using Kajabi Pages.
Then, navigate to your Kajabi account:
  1. Open the Website tab from the Dashboard.
  2. Click Pages.
  3. Select the second page containing the Form you want autofilled.
  4. Click Settings in the editor.
  5. Open Custom Code.
  6. Paste the Javascript code into the Javascript box.
  7. Click Save to keep and apply your changes:
After entering and saving your custom code onto your page, the setup is complete. When a visitor completes and submits the first Form, the second Form autofills with their name and email from the information submitted in the first Form.

Premier

If you are using Premier, you need access to the Code Editor only available with the Pro Plan. Check out kajabi.com/pricing to learn more about the features available with your pricing plan. First, copy the entire custom code above (including the opening and closing <script> tags; <script> and </script>). Then, navigate to your Kajabi account to access the Code Editor for your page built with Premier. Learn to access the code editor for your page. In the code editor, add the custom code to your page template:
  1. Open the Templates folder.
  2. Select the index.liquid file.
  3. Scroll to the bottom of the file.
  4. Place your cursor before the closing body tag (i.e., </body>).
  5. Click the enter key on your keyboard to create an empty line.
  6. Paste your custom Javascript code into the line directly above the closing body tag (i.e., </body>).
  7. Click Save to keep and apply your changes:
After entering and saving your custom code onto your page, the setup for a Premier page is complete. When a visitor submits the first Form, the second Form autofills with their name and email from the information submitted in the first Form.