# How can I identify companies without having to add a company field to the form?

**URL:** <https://forum.mautic.org/t/how-can-i-identify-companies-without-having-to-add-a-company-field-to-the-form/37513>\
**Category:** Mautic 6 Install/Upgrade Support\
**Created:** [March 21, 2026, 4:06pm UTC](https://forum.mautic.org/t/how-can-i-identify-companies-without-having-to-add-a-company-field-to-the-form/37513 "2026-03-21T16:06:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekatronik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekatronik/32/120_2.png) [@ekatronik](https://forum.mautic.org/u/ekatronik)\
**Post date:** [March 21, 2026, 4:06pm UTC](https://forum.mautic.org/t/how-can-i-identify-companies-without-having-to-add-a-company-field-to-the-form/37513/1 "2026-03-21T16:06:43Z")

</div>

Hi.

Let’s say I have a form (just a name and email address). I place this form on two websites, website A and website B.

Anyone who submits the form on website A will be identified as being from Company A,

and anyone who submits the form on website B will be identified as being from Company B.

How can I identify companies without having to add a company field to the form?

**Your software**  
My Mautic version is: 6.0.5  
My PHP version is: 8.1  
My Database type and version is:

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [March 22, 2026, 3:01pm UTC](https://forum.mautic.org/t/how-can-i-identify-companies-without-having-to-add-a-company-field-to-the-form/37513/2 "2026-03-22T15:01:01Z")

</div>

You potentially could save the referrer - or a static value - into a hidden form field. You add this via javascript on each site individually.

---

<div class="post-metadata">

**Author:** ![ekatronik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekatronik/32/120_2.png) [@ekatronik](https://forum.mautic.org/u/ekatronik)\
**Post date:** [March 23, 2026, 3:00am UTC](https://forum.mautic.org/t/how-can-i-identify-companies-without-having-to-add-a-company-field-to-the-form/37513/3 "2026-03-23T03:00:08Z")

</div>

Hi

Thank @dirk_s

Thanks for your reply, I’m curious to know the script via Gemini AI

And AI gives me complex javascript. 🤣

Then I came up with the idea of ​​adding a hidden text field on the form, and mark that field as Company name, in HTML I entered the value:“my\_company\_name”

and it worked

Thank you for your reply, which then gave me this idea.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [March 26, 2026, 8:16pm UTC](https://forum.mautic.org/t/how-can-i-identify-companies-without-having-to-add-a-company-field-to-the-form/37513/4 "2026-03-26T20:16:28Z")

</div>

Hi,

how could that be complex? - It could be as simple as that:

```auto
<script>
if (typeof MauticFormCallback === 'undefined') {
  var MauticFormCallback = {};
}

MauticFormCallback['myformname'] = {
  onValidate: function () {
    var field = document.getElementById('mauticform_input_myformname_hiddenfield');
    if (field) {
      field.value = 'myValue';
    }
  }
};
</script>

```

The scripts waits until form is loaded and then sets the field with the individual value.
