Home Forums Newsletter Plugin Support Gravity Forms integration?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #24088
    spudy12
    Participant

    I 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?

    #24172
    Stefano
    Keymaster

    Just contacted the gravity guys to find the best way to integrate.

    #24439
    spudy12
    Participant

    Look 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 more

    #24513
    frweb
    Participant

    I am really looking forward to this also. I will start using TNP in all my sites once option released! (they all use Gravity Forms)

    #31450
    Bart
    Participant

    Any news about this? It would be highly useful for me.

    #52918
    maelstrom06
    Participant

    Hello. 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);
        }
    }
    #52948
    maelstrom06
    Participant

    Ok, 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);
        }
    }
    #54777
    duplika
    Participant

    Hopefully 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.

    #60818
    Gavin
    Participant
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.