Hidden Custom Fields

When you pass hidden field values, the value can vary based on what page of your site the form is submitted on. For example, if you use the same Contact Us form across multiple pages of your site, you can pass a different value across each page.

Video demo of setting up and using hidden custom fields in forms

Passing Hidden Values on Forms.MP4

Passing form page link on the website using a hidden custom field

Let's assume we have the same form placed on several pages on the company website, and our sales team needs to know what page exactly the subscriber comes from. We can solve that by adding a hidden field to the form and modifying the form code in a certain way.

First, we need to create a hidden custom field. To add a hidden field to FunnelBud, do the following:

  1. In FunnelBud's top toolbar, click User Settings > Settings.

  2. In the left panel, under Features, click Custom Fields.

  3. Click Add Field > Lead Field.

  4. In the Field Label text box, a name for the field.

  5. In the Field Type section, click the Hidden radio button.

  6. Depending on if this is a new or existing field, click Create Field or Update Field.

Obtaining Hidden Field Information

Form embed codes can be modified. For system fields, you can pass your own values into these fields. For custom fields, instead of using the field name, you will need to use the field's system ID. To obtain a fieldID value, do the following:

Assuming that the field ID has this format 'aaaaaaaaaa', this is what the hidden field code would look like in the form without displaying placeholders:

ss_form.hidden = {'field_aaaaaaaaaa': window.location.href};

See how it looks when included the form code:

<!-- SharpSpring Form for (your form's name here) -->

<script type="text/javascript">

var ss_form = {'account': 'yyyyyyyyyyyyyyy', 'formID': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'};

ss_form.width = '100%';

ss_form.height = '1000';

ss_form.domain = 'app-zzzzzzzzzz.marketingautomation.services';

ss_form.hidden = {'field_aaaaaaaaaa': window.location.href};

// ss_form.target_id = 'target'; // Optional parameter: forms will be placed inside the element with the specified id

// ss_form.polling = true; // Optional parameter: set to true ONLY if your page loads dynamically and the id needs to be polled continually.

</script>

<script type="text/javascript" src="https://koi-zzzzzzzzzz.marketingautomation.services/client/form.js?ver=2.0.1"></script>