Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter golightlygl

    (@golightlygl)

    I’m not sure if the plugin was updated recently. I’m not sure when I ipdated to version 3.5.0 – it could have been straight from 3.4.0 to 3.5.1.

    Isd it worht reverting to 3.4.0 to see if the problem gets solved (and if so, how do I do that?)

    Thread Starter golightlygl

    (@golightlygl)

    Thanks for the reply. There doesn’t seem to be a way to attach a file (screenshot) here, but please not that nothing has been changed in the setup that was working fine and yet the processing of the mails has changed. This happened at a fixed point in time when suddenly the reply-to address started presenting incorrectly as the from email address.

    If I can send details to you by PM please let me know how, as i would rather not publish our email address in a public forum. The field tags however are as follows:

    Send to: {field_id=”1″}
    From name: {field_id=”0″}
    From name: (Force From name set in Settings)
    From email: no-reply@xxxxx.com
    Reply-To email: {field_id=”1″}

    (and yes it is puposeful that the send-to and reply-to are the same). However, since that set point in time, the reply-to email address in the header is becoming set as the from email address

    Thread Starter golightlygl

    (@golightlygl)

    That was it. Perfect. Thank you both for your help: I’m good to go now.

    Thread Starter golightlygl

    (@golightlygl)

    So $_POST[‘wpforms’][‘fields’][0][first] worked. Thanks.

    But that is the only additional field geting returned from my multi-field snippet. I added:

    add_filter('mc4wp_integration_wpforms_data', function($data) {
        $data['FNAME'] = $_POST['wpforms']['fields'][0][first];
        return $data;
    	$data['LNAME'] = $_POST['wpforms']['fields'][0][last];
        return $data;
    	$data['COUNTRY'] = $_POST['wpforms']['fields'][6];
        return $data;
    	$data['GDPR'] = $_POST['wpforms']['fields'][7];
        return $data;
    	$data['OPTIN'] = $_POST['wpforms']['fields'][3];
        return $data;
    });

    in the Edit Snippet plugin but only the first field gets returned. There is no error in the MC4WP console and no syntax warnings on the edit snippet page. If I change the order of the fields, whatever is the first field listed in the snippet gets returned but none of the others.

    Thread Starter golightlygl

    (@golightlygl)

    Well that’s a massive help: thank you! Definitely the way to go for we non-coders.

    And I can report that I’ve got it to work so that’s great. However, I am having a problem with WPFORMS Name field.

    This is a field that has two halves (FNAME, LNAME) and I thus can’t identify the field IDs to use in the code snippet. It seems to be identified as Field 0 First and Field 0 Last (shown below) when I inspect the element.

    <input type="text" id="wpforms-2672-field_0-last" class="wpforms-field-name-last wpforms-field-required" name="wpforms[fields][0][last]" required="">

    SO would I replicate that in the code snippet thus:

    add_filter(‘mc4wp_integration_wpforms_data’, function($data) {
    $data[‘FNAME’] = $_POST[‘wpforms’][‘fields’][0][first];
    return $data;
    });

    As a secondary question: if I have mutiple fields that I want to add, do I have multiple code snippets or can I add them all as one large snippet encompassing all the fields (and if so how).

    Thanks again. I’m really not asking without trying and learning, but I am a tad lost.

    Thread Starter golightlygl

    (@golightlygl)

    Thank you, that is clear. However, I want to be confident I’m not going to destroy anything in the way I use the code. So to be clear:

    1) Locate: WP-Includes/functions.php
    2) Scroll to the bottom of the file
    3) add the code as a function: ie the actual code added would be

    function add_filter('mc4wp_integration_wpforms_data', function($data) {
        $data['COUNTRY'] = $_POST['wpforms']['fields'][6];
        return $data;
    }

    so I have added the word function to your code snippet and deleted the final bracket and semi-colon );

    The field name COUNTRY was found in the Mailchimp, Audience, Settings page under the column Put this tag in your content:

    The field ID 6 was found by inspecting the element in a browser when the field is displayed

    Thank you for your patience helping a non-coder through this

    Thread Starter golightlygl

    (@golightlygl)

    As per the original report, logging was logged as “everything” and nothing showed up at all. It looks like I may have to change the form to something else. Any light plugin you particularly recommend?

    Thread Starter golightlygl

    (@golightlygl)

    Yes, all my lists are there and one is selected. I can’t really change the field name. The form is built using Avia in the Enfold theme and is from a “Contact Form” element. But it is set to be validated as an email address. Do we think this is the problem? How does your plugin parse the form?

    Thread Starter golightlygl

    (@golightlygl)

    There is no option for “enabling” but, as advised in the original post, I have included the code snippet and the button successfully displays on the form.

    Am I missing something?

Viewing 9 replies - 1 through 9 (of 9 total)