Update existing Lead through Form

Let me explain our use case, and your advice would be greatly appreciated. We use Mautic forms to collect leads and periodically we have to update a number of custom fields by asking the lead to re-enter them.

It is imperative that we update the exact lead record, but see no way of doing this using Mautic forms other than turning kiosk off, but we cannot rely on that.

Is there someway of passing the lead id into the form and getting the form to update that lead, rather than creating a new lead?

The id is the only unique column on the table.

We have developers, so a development solution is possible, though they are presently think the best solution is develop a totally new form handling system that uses the Mautic API to update the correct lead.

Your advice and thoughts are really welcome.

I would hide email field in the form and fill it out from the query variable:


When user clicks on the link and the form contains email field it will save it into the hidden email field and then thats gonna update the record with that specific email rather then create a new record.

I would first test the above, before developing the new form handeling system.

The other way, to achieve that I think would be to send form data using mautic tracking script and using mt(‘send’, {}) function.

See here for more info: < Contact tracking | Mautic >.

Hope it helps.

HI, the email field is not unique.

Should we create a unique field on the table and do this?

It looks like it is unique:

but yeah, if that does not work for you, you can also create another field and use that field then.

thanks. Do you know how unique works. For the records that have null values, will they be merged? We actually have another field, which is either unique or null.

We dont want the null records to be be merged into 1.

Thanks for your help.

I do not think it will be merged into 1. If the lead can be clearly identified based on form values it will be updated otherwise new record will be created.

Best to test on a real example, before moving to prod. for stuff like this. :slight_smile:

We have our Mautic set with email as the unique identifier and if a contact (lead) submitted the form again with same email address, it’ll update the contact (lead) information but the company are appended with a new company next to it.

Same with importing CVS file into contact, it will match email as the unique identifier and update the contact information unless I set “not to overwrite” before importing in.