Mautic Community Forums

Customize Quick Add Contacts

I’ve been trying to figure out how to customize the Company field in the Quick Add feature of Mautic.

I really need it to display the City and State - all of our companies are in the US, so I don’t care as much about the country. Unfortunately we have way too many of the same/similar company names loaded in and it is hard to keep track!

Appreciate any pointers!

Have not done this before, but this is how I would approach it:

  • The relevant form type that has this companies loaded is here: Mautic\LeadBundle\Form\Type\CompanyListType

  • It looks that it gets relevant data by calling getLookupChoiceListAction method located here: ./CoreBundle/Controller/AjaxLookupControllerTrait.php

What I would:

  • Register custom controller with custom action that loads companies into select but ensures that company name contains City and state (this controller and method would be very similar to the one in AjaxLookupControllerTrait)
  • Register extension of a form CompanyListType and provide custom method implemented before in the configuration

Thanks for the reply. Unfortunately this is a bit beyond my element here so may need to get some more assistance with that.

I’ll do some additional research to see what I can come up with however.

Thanks again

@marcalle

If you need someone to take care of development and cannot find anyone, maybe I can help. Shoot me a private message on this platform if you are interested.