• Resolved rod

    (@nomadarod)


    Hi,

    I have a hidden field to add the date but I get this error sending to mailchimp:
    “[“[ADDON]”,”Forminator_Addon_Mailchimp_Wp_Api::request”,{“type”:”https:\/\/mailchimp.com\/developer\/marketing\/docs\/errors\/”,”title”:”Invalid Resource”,”status”:400,”detail”:”Your merge fields were invalid.”,”instance”:”XXXXX”:[{“field”:”MMERGE12″,”message”:”Please enter the date”}]}]”

    Isn’t it supposed to get the date automatically, as it is a hidden field?

    I see that just above in the log there is:

    “{“FNAME”:”sjd”,”LNAME”:”udsud”,”MMERGE10″:”7″,”MMERGE11″:”Ch\u00e8que”,”MMERGE12″:”14\/08\/2023″,”MMERGE3″”

    Thanks

    Rod

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @nomadarod

    I hope you’re well today!

    If you set hidden field to “date” option then it is supposed to get the date automatically. I’m pretty sure it does show the date correctly if you check form submission on “Forminator -> Submissions” page.

    But I was able to replicate the issue with MailChimp integration. I’m not quite sure yet why it’s happening – whether it’s a bug (of which we weren’t yet aware) or if it’s a due to some specific configuration setting.

    I have already asked our Forminator Team for additional insights into this and I’m awaiting their feedback so please stay tuned – we’ll update you here soon with more information on the issue.

    Kind regards,
    Adam

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @nomadarod

    I hope you’re fine!

    First of all, I apologize for such a long delay in my response.

    I actually got feedback from our developers very quickly but somehow I missed it only until now. I’m very sorry about that, that’s my fault entirely.

    Back to the issue:

    It seems that the problem seems to be simpler and related to date format. I was initially able to replicate the issue but also missed the date format settings. Point is that the date format at MailChimp is by default different than format used by hidden field. So they need to by “matched”.

    When I set hidden field on the form to use “Date (mm/dd/yyyy)” and then in MailChimp in

    “Audience -> Settings -> Audience Fields & Merge Tags”

    at the very bottom I chose “Date format” to be “MM / DD / YYYY” (so essentially the same as in hidden field) – it started to work.

    Could you please double-check those settings and see if that solves the issue for you as well?

    Once again, I apologize for the delay!

    Kind regards,
    Adam

    Thread Starter rod

    (@nomadarod)

    Hi Adam,

    Thank you for coming in help on this again.

    I rechecked the date format. They are both set to dd/mm/yyyy

    I’m puzzled. The contact shows on the top of the list of contacts in mailchimp, which means that something was sent, but then it misses many of the parameters inserted in the form, including the date hidden field.

    I tested it again and checked the debug file. Same error: “errors”:[{“field”:”MMERGE12″,”message”:”Please enter the date”}]}]

    • This reply was modified 1 year, 6 months ago by rod.
    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @nomadarod,

    Could you please provide an export of the form so that we can take a closer look at the issue? Please share the export using Google Drive or DropBox.

    I hope the following guide comes in handy: https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    We look forward to hearing back from you.

    Kind Regards,
    Nebu John

    Thread Starter rod

    (@nomadarod)

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @nomadarod,

    Thank you for sharing the form export file.

    I was able to replicate similar issues on a lab site while testing it, so I’m forwarding all the details to our developers for further troubleshooting.

    We’ll be letting you know, once there’s an update. Please note, that it may take longer for them to provide feedback, depending on the amount of current complex tasks.

    Best Regards,
    Dmytro

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @nomadarod,

    I hope you’re doing well today!

    The issue with the date happens due to the unexpected PHP behavior described here.

    Forminator developers will be working on fixing this in one of the future versions, but there’s no ETA, I’m afraid.

    As a workaround for now, could you please try adding the following snippet as a must use plugin to /wp-content/mu-plugins/ directory on the server:

    <?php
    
    add_filter( 'forminator_addon_mailchimp_form_submitted_data', 'wpmudev_change_submitted_date_fields', 10, 3 );
    function wpmudev_change_submitted_date_fields( $submitted_data, $form_id, $form_settings_instance ) {
        if ( $form_id != 670 ) { //Please change the form ID
            return $submitted_data;
        }
    
        //Please change the hidden field ID
        $submitted_data['hidden-1'] = str_replace('/', '-', $submitted_data['hidden-1']);
        $submitted_data['hidden-1'] = date('d-m-Y', strtotime($submitted_data['hidden-1']));
    
        return $submitted_data;
    
    }

    – change 670 to your form ID (from the shortcode).

    Let us know if there’s still any issue.

    Best Regards,
    Dmytro

    Thread Starter rod

    (@nomadarod)

    Hi Dmytro,

    It worked!! Thank you so much for being there!

    All best!

    Rod

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Failed to send to mailchimp – date hiden field’ is closed to new replies.