Add contact when a form is submitted

ptgx

Member
Hi,

I need help for a little problem: i use wordpress for my company. Everytime a form is submitted, the datas are sent by email to the person in charge of the service. But i would like to record the datas automatically in Mailwizz. For that, i can use the form generated in the mailwizz list option. It's working but i cant add the possibility to send an email when the datas are recorded.

The API can probably do that for me, but iam not a professional developer, so it's a bit difficult for me to do that. Could you help me ? Thank you !

Pascal
 
Hi @twisted1919

The customer choose the service page he wants to contact, and he completes the form (contact form plugins in wordpress).

The datas submitted in the form are, for example:
email, first name, last name, message

I want to record datas in Mailwizz, and send an email notification when the form is submitted. The email address to notify is not always the same, it depends of which service the customer choose.

Thank you !
 
@tty0 - Some contact form plugins, such as Layered popups, do have integrations with mailwizz, so that can make your life easier.
Can you tell me what plugin you're using? I can look through it and maybe they have a hook we can use to send that email to mailwizz.
 
@tty0 - I took a look at the contact 7 plugin and came up with something, see attached wordpress plugin.
You will have to unzip it, and open the tty0-cf7-mwz.php file and add your mailwizz info where you see this:
Code:
define('TTY0_MWZ_API_URL', 'REPLACE ME');
define('TTY0_MWZ_API_PUBLIC_KEY', 'REPLACE ME');
define('TTY0_MWZ_API_PRIVATE_KEY', 'REPLACE ME');
define('TTY0_MWZ_API_LIST_UID', 'REPLACE ME');
Then upload the folder in your wordpress plugins folder and activate the plugin, then send a test contact form and see if you receive something in mailwizz.
Please note that this has never been tested, it's something that i did in 10 minutes from looking at cf7 code, so no guarantee, better test it on a test wordpress first.
 

Attachments

@twisted1919
Thank you very much for the time you take to help us !

- i've unzip the folder, changed the 4 lines with correct configuration, upload the folder in /wp-content/plugins/ and create a contact 7 form to test.

For the moment, the mail is sent, the waiting icon rotates indefinitely and the datas are not recorded in Mailwizz.
Try it:

http://bit.ly/1Sc4dv9

The Mailwizz server is not the same as this server
 

Attachments

  • capture.png
    capture.png
    97.8 KB · Views: 11
Last edited:
@tty0 - i think if i get some ftp info to be able to edit the plugin, i can make this work really quick ;)
PM me with ftp info if doable ;)
 
Back
Top