# No auto-fill of the COMPANY FIELDS in the Mautic form

**URL:** <https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627>\
**Category:** Product Support\
**Created:** [February 6, 2020, 9:39am UTC](https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627 "2020-02-06T09:39:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorgedeviena](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jorgedeviena/32/636_2.png) [@jorgedeviena](https://forum.mautic.org/u/jorgedeviena)\
**Post date:** [February 6, 2020, 9:39am UTC](https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627/1 "2020-02-06T09:39:11Z")

</div>

**Your software**  
My Mautic version is: v2.15.3  
My PHP version is: 7.2.21-1

**Your problem**  
My problem is: When an existing contact with an assigned company gets to a Mautic landingpage, the data of the CONTACT FIELDS are automatically filled in the Mautic form. But not the assigned COMPANY FIELDS of this contact. The COMPANY FIELDS in the form are still blank.

These errors are showing in the log: No log file

Steps to reproduce

1. Create a landingpage with a form and the fields “contact name, company name and company street”
2. Create an email with a link to this landingpage
3. Send an email to an existing contact with an assigned company
4. The CONTACT FIELD “contact name” is correctly auto-filled. The COMPANY FIELDS “company name” and “company street” keep wrongly blank. (Wrongly, because the data of the company name and company street already exist in the Mautic database)

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [October 31, 2022, 5:49pm UTC](https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627/2 "2022-10-31T17:49:04Z")

</div>

Any solution to this? @jorgedeviena

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [October 31, 2022, 11:40pm UTC](https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627/3 "2022-10-31T23:40:05Z")

</div>

You might be able to add logic for this on client side if you extend mautic tracking script (add custom functionality to mautic).

If above does not work, yo can always add additional JS directly to page and on mautic end just add endpoint your calling to get data for company.

Although I would have some questions, what do you do if one contact has multiple companies (which one do you choose)?

---

<div class="post-metadata">

**Author:** ![adiux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adiux/32/5793_2.png) [@adiux](https://forum.mautic.org/u/adiux)\
**Post date:** [August 7, 2023, 4:02pm UTC](https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627/4 "2023-08-07T16:02:01Z")

</div>

Based on my tests this is still an issue in Mautic 4.4.6

---

<div class="post-metadata">

**Author:** ![adiux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adiux/32/5793_2.png) [@adiux](https://forum.mautic.org/u/adiux)\
**Post date:** [August 7, 2023, 4:04pm UTC](https://forum.mautic.org/t/no-auto-fill-of-the-company-fields-in-the-mautic-form/12627/5 "2023-08-07T16:04:52Z")

</div>

I also found this issue that was closed due to inactivity: [No auto-fill of the COMPANY FIELDS in the Mautic form · Issue #8400 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/8400)

@npracht raises a good question in the issue. How do we deal with contacts that are members of multiple companies.

Edit1:  
After some further investigation: the code already has a method that gets the values from the primary company `getProfileFieldsWithPrimaryCompany()`

So we could use that to auto-fill the company values from the primary company.

Edit2:  
I created a PR for this. Please test it: [Pre-Fill the primary company values in the form if they are mapped by adiux · Pull Request #12635 · mautic/mautic · GitHub](https://github.com/mautic/mautic/pull/12635)
