Title: Error when submitting form
Last modified: January 30, 2023

---

# Error when submitting form

 *  Resolved [popmillipede](https://wordpress.org/support/users/popmillipede/)
 * (@popmillipede)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-submitting-form-12/)
 * I have successfully connected my wordpress site to Mailchimp via the MC4WP plugin
   with an API key. I can see my custom fields and other mailchimp account info.
   
   I created a form using MC4WP and deployed it to a test page. It looks fine but
   won’t submit. It generates the following error. I’ve tried multiple times, recreated
   from scratch, commented out all fields but the name and email, and I always get
   the same error. Any ideas on why this doesn’t work.Note: I’m able to successfully
   submit contacts using an embedded mailchimp form at [https://electangelabirney.com/endorse-angela/](https://electangelabirney.com/endorse-angela/).
   But I like the form-building experience better in MC4WP and it looks much better
   on mobile with no mods vs the mailchimp-created form.
 * POST [https://us21.api.mailchimp.com/3.0/lists/5c8e09bb16/members](https://us21.api.mailchimp.com/3.0/lists/5c8e09bb16/members)
 * {“status”:”subscribed”,”email_address”:”gsch***@ho*****.com”,”interests”:{},”
   merge_fields”:{“FNAME”:”G”,”LNAME”:”S”,”MMERGE6″:”Hope this works”,”PHONE”:”5551212″,”
   TITLE”:”Ambassador”},”email_type”:”html”,”ip_signup”:”73.59.104.9″,”tags”:[“endorser2023″,”
   webform”]}
 * Response:
 * 400 Bad Request
 * {“type”:”[https://mailchimp.com/developer/marketing/docs/errors/&#8221](https://mailchimp.com/developer/marketing/docs/errors/&#8221);,”
   title”:”Invalid Resource”,”status”:400,”detail”:”Your merge fields were invalid.”,”
   instance”:”6415dca7-dd48-f650-eca5-b7886d81b4c9″,”errors”:[{“field”:”ENDTYPE”,”
   message”:”Please enter a value”}]}
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-when-submitting-form-12%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-submitting-form-12/#post-16423907)
 * The field ENDTYPE is set to be a required field, but it’s not added to the form.
   
   You can check in your Mailchimp.com account under Audience settings > Fields 
   if certain fields are marked as required. If they are, you either need to add
   those fields to all your forms and integrations, or uncheck the box “required”.
 * Hope that helps. If you have any questions, please let me know!
 *  Thread Starter [popmillipede](https://wordpress.org/support/users/popmillipede/)
 * (@popmillipede)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-submitting-form-12/#post-16427012)
 * Thanks for the reply Lap. I’m confused about a few things:
   1. The ENDTYPE field
   is on the form.ENDORSEMENT TYPE:  ELECTED OFFICIAL  COMMUNITY MEMBER
 *     ```wp-block-code
       <p>
           <label>Endorsement Type:</label>
           <label>
               <input name="ENDTYPE" type="radio" value="0" required=""> <span>Elected official</span>
           </label>
           <label>
               <input name="ENDTYPE" type="radio" value="1" required=""> <span>Community member</span>
           </label>
       </p>
       ```
   
 * 2. ENDTYPE is not required in my master field setup in Mailchimp. But a response
   is required on this form. Regardless, it’s on the form so this shouldn’t matter.
   
   3. I ran a test removing all fields but name and email and it still generates
   the same error.
 *  Thread Starter [popmillipede](https://wordpress.org/support/users/popmillipede/)
 * (@popmillipede)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-submitting-form-12/#post-16427579)
 * I figured this out and think it may be a bug in the Mailchimp API. You were correct
   that I had set ENDTYPE to required. I was looking in the form builder but should
   have looked in the master list of fields. It was set there and should not have
   been since it’s not required on every form (whereas first/last name and email
   are).
   However, this doesn’t matter unless you’re using the API. And it doesn’t
   matter if ENDTYPE is included in the form (as it is with my MC4WP test form) 
   and sent by the API. It still fails if a custom field is required in the master
   list. I figured this out when using a Mailchimp integration on Anedot (campaign
   donation service). It sends a few donor fields to Mailchimp but knows nothing
   about ENDTYPE. However it generated this error:
 * `{
   "type": "https://mailchimp.com/developer/marketing/docs/errors/","title": "
   Invalid Resource","detail": "Your merge fields were invalid.","errors": [{"field":"
   ENDTYPE","message": "Please enter a value"}],"status": 400,"instance": "bf2c9d47-
   aa6b-e740-c703-cb1be742c086"}
 * Unchecking Required in the master list for ENDTYPE fixed the issue for both apps.

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

The topic ‘Error when submitting form’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [popmillipede](https://wordpress.org/support/users/popmillipede/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/error-when-submitting-form-12/#post-16427579)
 * Status: resolved