Lead Gen & CRM
How can we help you?
Search our help articles, video tutorials, and quickstart guides

You've got this. You've got us. Search our Knowledge Base to quickly find answers to your questions.

Excluding Fields from Native Form Submissions

Article: 000050481
Updated: July 26, 2024

Prevent certain form fields from being submitted to Lead Gen & CRM

When submitting native form data, you can exclude fields. There are reasons why you may want to exclude fields from being submitted to Lead Gen & CRM - for example, in the event that the field contains sensitive data or the field would cause the submission of the form to fail.

 
 
Users:
Administrators 
Company Managers  
Marketing Managers  
Sales Managers  
Salespersons  
Jr. Salespersons  


Excluding Fields

When collecting form data, there can be reasons to exclude a field from the submission to Lead Gen & CRM. The most common reasons for this are:

  • The field includes sensitive data. The field includes data, such as passwords or social security numbers, that should not be transmitted over the connection to Lead Gen & CRM.
     
  • Fields that cause form submissions to fail. Some third-party providers add additional fields that do not need to be collected by Lead Gen & CRM, but have names or data that cause issues due to length or special characters.

To edit your native form embed code to exclude passing specific fields, do the following: 

  1. Click Forms in the left toolbar.
  2. Create or open a native form.
  3. Copy the form's embed code.
  4. Add the  var hidden = []; code snippet directly below the 
    var __ss_noform = __ss_noform || []; code snippet in a text editor.
  5. Add the hidden.push("field_name_1"); code snippet underneath the var hidden = []; code snippet.
  6. Replace field_name_1 with the name attribute of the field to be excluded.
  7. Repeat as necessary for each field that will be excluded.
  8. Add the code snippet __ss_noform.push(['exclude', hidden]); directly below the __ss_noform.push(['endpoint', 'xXxXxXxX-xXxX-xXxX-xXxX-xXxXxXxXxXxX']); code snippet.
  9. Place the edited native form script before the closing <form> tag or closing <body> tag on the page where the native form lives.
  10. Submit the form.
  11. Map the fields in Lead Gen & CRM.

Excluded fields will not appear on the field mappings page for your form.
 

Note: Constant Contact offers Professional Services to assist with custom coding.


Code Examples

The following is an example embed code before edits.
 

<!-- Lead Gen & CRM Native Form -->
<script type="text/javascript">
    var __ss_noform = __ss_noform || [];
    __ss_noform.push(['baseURI', 'https://app-xXxXxXxXxX.marketingautomation.services/webforms/receivePostback/xXxXxXxXxX/']);
    __ss_noform.push(['endpoint', 'xXxXxXxX-xXxX-xXxX-xXxX-xXxXxXxXxXxX']);
</script>
<script type="text/javascript" src="https://koi-3QKH0X1U88.marketingautomation.services/client/form.js?ver=1.1.1"></script>


The following is an example embed code after edits.
 

<!-- Lead Gen & CRM Native Form -->
<script type="text/javascript">
    var __ss_noform = __ss_noform || [];
    var hidden = [];
    hidden.push("field_name_1");
    hidden.push("field_name_2");
    hidden.push("field_name_3");
    __ss_noform.push(['baseURI', 'https://app-xXxXxXxXxX.marketingautomation.services/webforms/receivePostback/xXxXxXxXxX/']);
    __ss_noform.push(['endpoint', 'xXxXxXxX-xXxX-xXxX-xXxX-xXxXxXxXxXxX']);
    __ss_noform.push(['exclude', hidden]);
</script>
<script type="text/javascript" src="https://koi-3QKH0X1U88.marketingautomation.services/client/form.js?ver=1.1.1"></script>
 


Did this article answer your question?


Constant Contact Logo

Copyright © 2025 · All Rights Reserved · Constant Contact · Privacy Center