• Resolved dave70

    (@dave70)


    Hi Olaf,

    Is it possible to add an emailOctopus checkbox to a contact7 form so that a person asking a question can also subscribe at the same time.

    many thanks

    Dave

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Olaf Lederer

    (@finalwebsites)

    Hi Dave,
    right now there is no integration to other form plugins, but since the CF7 plugin has a lot of action hooks, it’s possible to add a subscriber to EmailOctopus using some PHP code in your functions.php file.
    I wrote an example snippet and added also an example form into the comments:
    https://gist.github.com/finalwebsites/a5f36bd0fc6af000b7c731d5e892c85d

    Most important is that you use a checkbox with the name “newsletter” and the “name” and “email” field names need to match also.

    Let me know if your have further questions.

    Thread Starter dave70

    (@dave70)

    great, thanks for that. I’ll try it out and get back to you. Again, many thanks.

    Thread Starter dave70

    (@dave70)

    Hi Olaf,

    I’ve implemented it but I’m having issues I’m afraid. I added some logging and can see that the php code is invoked and gets into the newsletter checkbox section. It go’s through each step of that part of the code but I don’t see the email details put into my emailOctopus list. Any ideas what I can check now?

    thanks

    David

    Plugin Author Olaf Lederer

    (@finalwebsites)

    HI David,

    It’s important that you add the API Key and choose a list on the plugin settings screen.
    Do you tried the EO4WP shortcode? Does a subscription work flawless while using that one?
    If yes, then it is likely that the names of your form fields do not match the variables in the PHP code snippet.
    Try also a new Contact Form 7 form with the fields from my comment I posted on the Gist/Github page.

    If it’s still not working, please send me a link to your form that can take a look.

    Thread Starter dave70

    (@dave70)

    Hi Olaf,

    so I already had a subscription popup working for emailOctopus using the shortcode. I have the checkbox on my checkout but it appears to not be working either. I had got the names of the fields in the form the same as you used but I made a new form as you suggested copying the code from github and tried it but I still didn’t get anything going to emailOctopus. Thanks again for the help

    • This reply was modified 3 months ago by dave70.
    Thread Starter dave70

    (@dave70)

    Just had a thought. I have both the emailOctopus and your plugin installed. The popup form is setup using emailoctopus where as the checkboxes are through your plugin and it has a different api number. I thought there might be an issue with the api so created a new one and linked it and now everything seems to be working. Thanks for all the help and a great plugin and sorry for the confusion.

    Plugin Author Olaf Lederer

    (@finalwebsites)

    Hi,
    I found the problem in your footer contact form, the name for the checkbox is not just “newsletter”.

    <input type="checkbox" name="newsletter[]" value="Please send me your newsletter">

    The square brackets makes it something different. Please check your CF7 form.

    For the WooCommerce checkout. This form looks good, it possible to share your settings using a screenshot (mask the API code). The API connection works if you see your EO lists inside the select menu’s on the settings page(s).
    Settings > EO4WP or
    WooCommerce > Settings > Integrations > EmailOctopus

    Plugin Author Olaf Lederer

    (@finalwebsites)

    The popup form is setup using emailoctopus where as the checkboxes are through your plugin and it has a different api number. I thought there might be an issue with the api so created a new one and linked it and now everything seems to be working.

    The popup is from the “regular” EO plugin. The API for this function isn’t used for the other plugin.

    Thread Starter dave70

    (@dave70)

    Hi Olef,

    Strange about the contact form error you found because I just copied and pasted the code from your github page. I did find the issue though. The api I had for your plugin must have been corrupt or something because when I created a new one in emailoctopus and used it in your plugins settings everything started working. Thanks again for the help though and I’ll close the issue.

    Plugin Author Olaf Lederer

    (@finalwebsites)

    I’m glad it’s working now!

    Actually you brought something to my attention which is related to the new EmailOctopus API version.
    I will check if this version difference might bring up any problems. I didn’t use the new version because they change one thing I don’t like.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.