Company Blog Support
Sean Cuevas


    Back to Top

    Legacy Smart Forms: Prefill Fields with Contact Data


    With ONTRAPORT, you have the ability to send your Contacts to a legacy Smart Form that’s pre-populated with their contact data. By pre-populating a legacy Smart Form, you reduce the number of steps a Contact needs to take, making it even easier for them to opt in and making them more likely to do so! This is done by sending your existing contacts an email containing a PURL that sends them to an ONTRAPORT Legacy Landing Page containing the pre-populated form. Note that because a PURL is required, your contacts must have a First Name in their contact record.


    Note: This knowledge base article is for the older legacy Smart Forms and Legacy Landing Pages. Our new ONTRApages and ONTRAforms use a different method to prefill fields with cookie data rather than this legacy system. 



    How to Set This Up

    1. Create a new Smart Form

    2. Select the field you’d like to pre-populate.

    3. Fill the Prefill field with the corresponding Merge Field

      1. For example, in the ‘First Name’ Field you’d enter [First Name]

      2. To gain access to the proper syntax for your Merge Fields, we suggest using the ONTRAPORT Email Builder and inserting Merge Fields into the body of a throwaway email, then copying and pasting those Merge Fields over to the proper pre-fill box in your Smart Form.


    4. Grab the HTML form code

      1. Save the form

      2. Click the Publish Form button

      3. Select the HTML Version of the code and copy the text to your clipboard prefill2.png

    5. Add the form code to a Landing Page

      1. Open a new or existing "Legacy Pages" Landing Page

      2. Add an HTML Layer

      3. Double click the layer and paste the HTML code into the HTML layer

      4. Save the Landing Page

    6. Send contacts to the PURL of this landing page

      1. Open the Email message you want to add the PURL or hyperlink to

      2. Set your cursor where you’d like to insert the link and open the dropdown menu just below the content box titled Merge Fields

      3. From the dropdown menu find the PURLS section. The page you just saved will be listed there, select it to insert it into your message.

      4. Be sure to copy from HTML so that your message gets optimal delivery/reads and save.

    How to Test your Smart Form

    1. Testing your Smart Form

      1. Add yourself as a contact in your database with a valid email address

      2. Send yourself the email message you created in step 6

        1. Note that using the “Send Test Email” function won’t populate your personal information - it will just display your default merge values.

      3. Check to see if your contact data is pre-populated on the Smart Form

        1. Keep in mind that the Smart Form will only pre-populate a field if you have data stored in the Contact Record of a contact for that particular field

    Other Important Facts

    • The process above only works if you use the HTML version of the Smart Form code.
    • If you send a contact to a pre-filled Smart Form that contains fields that aren't already filled out in their Contact Record, the Field on the Smart Form will populate with what you have set for that field in DEFAULT MERGE FIELDS in Contacts > Settings
    • This feature does not work on secure Landing Pages (https), only on non-secure Landing Pages (http)
    • This method requires a valid PURL; only contact records with the First Name field populated will receive a properly formatted PURL. This method will not work if the First Name field is blank.
    • An alternate method is used to prefill Smart Forms in integrated WordPress sites: How to Prefill ONTRAPORT Smart Forms in WordPressexternal link

    Articles in this section

    Have more questions? Submit a request


    • Avatar
      Amy Turner

      I followed the instructions, but the landing pages are not showing up in the PURLS section of the Merge Field dropdown menu of the email message :(

    • Avatar
      Amy Turner

      Also, it's a bummer pre-fill doesn't work with secured pages.  The main reason I want to use this is so contacts don't have to fill out forms again and again when purchasing our products, but I'm not going to send them to an unsecured url.  Any way to make this feature available for secured URLs too?

    • Avatar
      Amy Turner

      Got the answer for the landing pages not showing up:  it doesn't update unless you refresh your browser tab.  After I did that, they showed up.

    • Avatar
      Samantha Hartley

      Why doesn't this work if you add the SmartForm to an Ontraport landing page using the "form" layer? That's weird.

    Powered by Zendesk