• Resolved ebud

    (@ebud)


    Anything special I need to be aware of when integrating with the WP registration form… field names…etc?

    I am using a 3rd Party plugin for registration “Theme My Login” and have some extra fields. My MC list is pretty basic with First Name, Last Name, Email and a radio button for agree to terms. The basic subscribe form works perfectly. Now I would like to add the Add to list option checkbox to the registration form. I have enabled the integration option and settings through the Plugin UI and the Check boxes shows up. I also add the extra agree to terms field.

    Registration is working, but I am seeing any opt in emails and I am not getting added into the list.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Lap

    (@lapzor)

    Hi,

    With custom registration form you might need to use our custom integration method instead of default integration: https://kb.mc4wp.com/add-sign-checkbox-custom-form/

    If some fields are not automatically picked up by our plugin you van add mc4wp- to their name. for example mc4wp-EMAIL will capture the field email and send it to MailChimp.

    Hope that helps!

    Kind regards,

    Thread Starter ebud

    (@ebud)

    Do I need to prefix all field that would go to Mailchimp with mc4wp- ?

    It looks like some mc5wp fields are getting automatically inserted and I manually added:
    <input type=”hidden” name=”mc4wp-subscribe” value=”1″ />

    Still no luck.

    Here is a snippet

    <input name="AGREEMENT" type="radio" value="Yes" required> <span>Check here to indicate that you have read and agree to the License and Maintenance Agreement</a>.</span>
    <input type="hidden" name="mc4wp-subscribe" value="1" />    
    <!-- MailChimp for WordPress v4.1.6 - https://mc4wp.com/ --><input type="hidden" name="_mc4wp_subscribe_wp-registration-form" value="0" /><p class="mc4wp-checkbox mc4wp-checkbox-wp-registration-form"><label><input type="checkbox" name="_mc4wp_subscribe_wp-registration-form" value="1" checked="checked" /><span>Keep me informed about Software updates!</span></label></p><!-- / MailChimp for WordPress -->
    • This reply was modified 7 years, 2 months ago by ebud.
    Thread Starter ebud

    (@ebud)

    I am seeing this is the debug…

    [2017-09-15 12:09:32] ERROR: Registration Form > MailChimp API Error: Bad Request. Your merge fields were invalid.
    – AGREEMENT : Please enter a value

    I tried prefixing the fieldname with mc4wp- still no luck.

    Do my firstname /lastname field names need to match exactly with what is shown in the MC form FNAME and LNAME?

    • This reply was modified 7 years, 2 months ago by ebud.
    Thread Starter ebud

    (@ebud)

    Resolved!

    Just needed to include this …

    add_filter( 'mc4wp_integration_data', function( $data ) {
    
    		if( ! empty( $_POST[ 'AGREEMENT' ] ) ) {
    			$data[ 'AGREEMENT' ] = sanitize_text_field( $_POST[ 'AGREEMENT' ] );
    		}
    	return $data;
    });
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Integrating Registration form’ is closed to new replies.