Home › Forums › Newsletter Plugin Support › Gravity Forms integration?
- This topic has 8 replies, 7 voices, and was last updated 5 years, 11 months ago by
Gavin.
-
AuthorPosts
-
July 8, 2016 at 9:42 pm #24088
spudy12
ParticipantI have set up the contact form 7 to subscribe users to the newsletter, is it possible to do the same thing with gravity forms?
On our sites, most visitors tend to contact us through the gravity forms form rather than the contact 7 form and we’d like to be able to capture these names and email addresses.Is this possible?
July 12, 2016 at 10:00 pm #24172Stefano
KeymasterJust contacted the gravity guys to find the best way to integrate.
July 28, 2016 at 1:56 am #24439spudy12
ParticipantLook forward to seeing this happen!
I would imagine its not to tricky as gravity forms seems to easily transfer data to a whole host of other plugins. Look forward to hearing moreAugust 1, 2016 at 11:08 am #24513frweb
ParticipantI am really looking forward to this also. I will start using TNP in all my sites once option released! (they all use Gravity Forms)
March 31, 2017 at 1:39 pm #31450Bart
ParticipantAny news about this? It would be highly useful for me.
November 13, 2017 at 9:04 am #52918maelstrom06
ParticipantHello. I’m trying to make a function to add a subscriber from a Gravity Form.
I have a field for the email [ID 100] and a checkbox to subscribe [ID 99].
When I submit any form I call this function who check the checkbox and add the email to the list.
This works OK, but the problem is that the confirmation email isn’t send. Any ideas about how to send that email?
Thank you.function add_boletin( $entry, $form ) { if ($entry["99.1"] == "si") { defined('ABSPATH') || exit; require_once WP_CONTENT_DIR . '/plugins/newsletter/includes/controls.php'; $controls = new NewsletterControls(); $module = NewsletterUsers::instance(); $controls->action = 'save'; $controls->data['email'] = $entry["100"]; $controls->data['status'] = 'S'; $user = $module->save_user($controls->data); } }
November 13, 2017 at 11:09 am #52948maelstrom06
ParticipantOk, I found how to send the email but it doesn’t generate the {subscription_confirm_url} 🙁
function add_boletin( $entry, $form ) { if ($entry["99.1"] == "si") { defined('ABSPATH') || exit; require_once WP_CONTENT_DIR . '/plugins/newsletter/includes/controls.php'; require_once WP_CONTENT_DIR . '/plugins/newsletter/includes/module.php'; $controls = new NewsletterControls(); //$module = NewsletterUsers::instance(); $module = NewsletterSubscription::instance(); $controls->action = 'save'; $controls->data['email'] = $entry["100"]; $controls->data['status'] = 'S'; $user = $module->save_user($controls->data); $defaults = $module->get_default_options(); if (empty($controls->data['profile_text'])) { $controls->data['profile_text'] = $defaults['profile_text']; } // Without the last curly bracket since there can be a form number apended if (empty($controls->data['confirmation_text'])) { $controls->data['confirmation_text'] = $defaults['confirmation_text']; } if (empty($controls->data['confirmation_subject'])) { $controls->data['confirmation_subject'] = $defaults['confirmation_subject']; } if (empty($controls->data['confirmation_message'])) { $controls->data['confirmation_message'] = $defaults['confirmation_message']; } //var_dump($controls->data); $controls->data['confirmed_message'] = NewsletterModule::clean_url_tags($controls->data['confirmed_message']); $controls->data['confirmed_text'] = NewsletterModule::clean_url_tags($controls->data['confirmed_text']); $controls->data['confirmation_text'] = NewsletterModule::clean_url_tags($controls->data['confirmation_text']); $controls->data['confirmation_message'] = NewsletterModule::clean_url_tags($controls->data['confirmation_message']); $controls->data['confirmed_url'] = trim($controls->data['confirmed_url']); $controls->data['confirmation_url'] = trim($controls->data['confirmation_url']); if (!empty($controls->data['page'])) { $controls->data['url'] = ''; // do not unset } var_dump($controls->data); $module->merge_options($controls->data); $controls->add_message_saved(); $module->mail($entry["100"], $controls->data['confirmation_subject'], $controls->data['confirmation_message'], $user); } }
November 22, 2017 at 4:09 am #54777duplika
ParticipantHopefully there is a way to integrate with Gravity Forms, so we are able to add a checkbox that would automatically subscribe a client to a certain list.
December 19, 2017 at 10:56 am #60818Gavin
Participant -
AuthorPosts
- You must be logged in to reply to this topic.