Mautic Community Forums

Programmatic form submission

I have a legacy app in Perl, I am collecting data and want to add that to my lead list via a programmatic form submission.



the response I am getting back from the Mautic is: form response: HTTP/1.1 200 OK



but the form does not show any results, the lead is not updated, no log entry in the Mautic logs. Any thoughts? Any ideas on how to troubleshoot this kind of thing on the Mautic side? (my team is very handy on the Perl side)

I have a legacy app in Perl, I am collecting data and want to add that to my lead list via a programmatic form submission.

the response I am getting back from the Mautic is: form response: HTTP/1.1 200 OK

but the form does not show any results, the lead is not updated, no log entry in the Mautic logs. Any thoughts? Any ideas on how to troubleshoot this kind of thing on the Mautic side? (my team is very handy on the Perl side)

Take a look a this PHP script for programmatic form submission:

https://medium.com/@jan_linhart/the-simplest-way-how-to-submit-a-form-data-to-mautic-1454d3afd005

My guess is that you are missing the return param in the submission data. It is required even though it has no meaning for this use case.

No the return param was not the issue, it was that Mautic was wanting an associative array. (i.e. the field names are NOT just email & firstname, they are mauticform[email] & mauticform[firstname]), reproducing this structure and posting it from the Perl side took some fiddling.