Im trying to create a GravityForms plugin to add/update leads in Mautic, but I’m having trouble understanding the API (note: I’m pretty new to coding with PHP so please go easy on me!).
Would love getting clarification on the following:
- I need to be able to map form fields individually by choosing from a list of all the lead fields. I know I create an array with
, but what does my foreach loop look like for field labels
and for field IDs (the latter for when I want to send my updated array back to Mautic).?
2. When using
to identify/update an existing lead, what would I use as
to match the listing by email address?. Also, just to verify: adding
as a paramater to
will create a new lead only if no lead exists
or do I need to perform some duplicate check on the form field first (using
for creating new leads, and leaving it out for updating existing ones)?
3. Whats the function for adding/removing a lead to/from a list?