Update contacts with the mautic form

My Mautic version is: 2.16.0
My PHP version is: 7.0.33-1

Hello there !
I’m new to mautic and want to know more about forms.
I searched a lot on the forum and google but can’t find what i’m looking for so here i am.

My needs :
I want to create a mautic form ans use it to update my contacts informations from a remote website or from the unsubscribe page.

What i have done so far :

  • i create a standalone form, i added a radio group to update the field “customers_newlsetter” (boolean type).
  • i linked this form to a landing page.
  • in my email i linked the landing page in the “Preference center page”.
  • i created a campaign with this mail.

Problematic :
All went well, i received the email from my campaign, when i clicked on the “unsubscribe link” i was redirect to my landing page with my form displayed.

But when i post my form, the succes message pop, no error. but nothing updated, the custom field “customers_newlsetter” wasn’t update for my contact.

And it was kind of normal since no contact ID was post with my form.

My question :
How to associate a contact with a mautic form ?

  • i need it in a case of unsubscribe but also if i linked a form on another website with script balises.

(the doc i read about it : https://mautic.com/help/forms/)

If someone had a suggestions it would be helpfull.

Thanks in advance for your help and sorry if the question was already asked, i didn’t find any related post to answered my needs.