Company Blog Support
Sean Cuevas
Updated

Contents

    Back to Top

    Legacy Smart Forms: Prefill Fields with Contact Data

    Introduction

    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. 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.

        Prefill1.png

    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

        Note: The HTML Version tab may not be present in your account. It can be added by disabling a security setting as explained in this section:

        Form Security Option: Disable Custom HTML Forms

        In response to spammers, list bombers, and bot submissions, ONTRAPORT employs a number of secret protection measures to stop the bad guys in their tracks. When a potential opt in is identified as bad the data is not added to the Contacts database at all, and no indication is given to the spammer that they have failed in their attempt. This prevents them from submitting the form millions of times trying to find the right combination of values. This enhanced security is enabled on all new accounts and available to all existing accounts.

        Why don't we force it to be enabled on all accounts? Enabling this option may break:

        • Any form installed on LeadPages, ClickFunnels or any SaaS platform that strips out or interferes with our JavaScript
        • Any form installed on a website if that site also includes a plugin, theme, or server configuration that prevents our JavaScript from communicating with the ONTRAPORT servers (common with some security plugins and specialty web hosts)
        • Any form presented to a prospect who is using a text-based browser such as Lynx or is using a JavaScript blocker such as NoScript.

        Because the form submission does not return an error page to the spammer, list bomber or bot, a valid prospect will not know that their opt in has failed. You will have no record in your account that the attempt was made. If you decide to turn this option on, please re-test your existing forms to make sure a valid Contact Record is made.

        Turning this feature On will have two immediate results:

        1. Legacy Smart Forms will no longer have the HTML Version form code available on the Publish screen.
        2. The enhanced form security processes will be enabled for all future submissions to your account from all existing and future Smart Forms, ONTRAforms and Smart Form blocks in ONTRApages.

        Unless the existing embedded forms are installed on a service that blocks our JavaScript, they will continue to work even if they were installed using the HTML Version form code. Retest your forms after turning this feature On.

        Turning this feature Off will make the HTML Version code available in Legacy Smart Forms and the enhanced form security processes will not be active. Spammers, list bombers and bots will still be able to get past our regular protection measures and submit bad contact information you will have to prune manually.

        How to Enable Form Security:

        1. Click the profile icon in the top right of your account and select Administration
        2. Click the Security tab
        3. Slide the toggle under Disable Custom HTML Forms to On

        Set Disable Custom HTML Forms to ON to enable the enhanced form security processes 

    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

    Created - Updated
    Have more questions? Submit a request

    Comments

    • 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