Since this way (using an API) is new to me, I am curious what’s possible.
Main Goals for start:
the form on the website:
*name: -> should be in mautic too
*email: -> should be in mautic too
company: -> should be in mautic too
textarea/message field: should be in the notification email (to the owner and the one who filled out the form as a kind of receipt)
the required fields should get validated (is filled out, is containing an email address) and show the help/error message beneath the form on the website if something is missing.
the tracking is already working I think. Not sure what sort of info should/could be stored in a custom field for tracking. But maybe interesting in the future.
I don’t use wp users or logged in users on wp. So the contact, that filled out the form, should basically be in mautic and receive a first welcome email.
Maybe I set up another Newsletter form, basically the same, but only 2 fields:
*name
*e-mail
the newsletter form is in the footer area of the website (no pop up). Since I have many pages, it would be interesting on which page (url) the newsletter was filled out and submitted. But I guess, that’s done already.
At the moment the form is on the site, copy pasted the HTML code (from mautic) into the code section on my website. An action is triggered after successful submit - send email with content to owner and contact. Another action on the webiste is the redirect to a url after submit. A “hurray” page with some recent content and instructions (check your email and so on).
All fine and good, I still can’t figure out, how to setup the error / help messages. If you don’t fill out the email address and hit submit, the action redirect is triggered, the contact is on the “Hurray” page but no one will ever get an email nor a contact in mautic. So the validation part is not working at the moment. Hope the API is more of use in this case.