ibericode / mailchimp-for-wordpress

#1 Mailchimp plugin for WordPress. Adds various sign-up methods to your site.
https://www.mc4wp.com/
GNU General Public License v3.0
134 stars 65 forks source link

All field already filled but form still asks "Please fill in the required fields" #517

Closed jevguilz closed 6 years ago

jevguilz commented 6 years ago

My website URL:

Dear Mailchimp for Wordpress Support,

We are encountering an issue with your mailchimp plugin integration where an embedded form from mailchimp is not submitting / sending due to it asks "Please fill in the required fields.". All the required fields in the form is already filled but still the error persists. Checking the debug log it says

"[2018-01-08 06:49:32] INFO: Form 8324 > Submitted with errors: required_field_missing"

Please see enclosed screenshot:

image

We are already using your premium plugin but this form is failing to send. To replicate the issue on your end, go to https://www.panzera.com.au/warranty-service/ and please try to fill out the form similar to the details provided in the attached screenshot.

How can we reproduce this issue?

  1. go to https://www.panzera.com.au/warranty-service/
  2. Fill out the form similar to the details provided in the screenshot
  3. or you may use the embedded HTML form:
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
    #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
    /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
       We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">

    <div id="mc_embed_signup_scroll">

<div class="indicates-required"><span class="asterisk">*</span> indicates required</div>
<div class="mc-field-group">
    <label for="mce-FNAME">First Name </label>
    <input type="text" value="" name="FNAME" class="" id="mce-FNAME">
</div>
<div class="mc-field-group">
    <label for="mce-LNAME">Last Name </label>
    <input type="text" value="" name="LNAME" class="" id="mce-LNAME">
</div>
<div class="mc-field-group">
    <label for="mce-EMAIL">Email Address  <span class="asterisk">*</span>
</label>
    <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
<div class="mc-address-group">
    <div class="mc-field-group">
        <label for="mce-MMERGE7-addr1">Address </label>
        <input type="text" value="" maxlength="70" name="MMERGE7[addr1]" id="mce-MMERGE7-addr1" class="">
    </div>
    <div class="mc-field-group">
        <label for="mce-MMERGE7-addr2">Address Line 2</label>
        <input type="text" value="" maxlength="70" name="MMERGE7[addr2]" id="mce-MMERGE7-addr2">        
    </div>
    <div class="mc-field-group size1of2">
        <label for="mce-MMERGE7-city">City</label>
        <input type="text" value="" maxlength="40" name="MMERGE7[city]" id="mce-MMERGE7-city" class="">
    </div>
    <div class="mc-field-group size1of2">
        <label for="mce-MMERGE7-state">State/Province/Region</label>
    <input type="text" value="" maxlength="20" name="MMERGE7[state]" id="mce-MMERGE7-state" class="">
    </div>
    <div class="mc-field-group size1of2">
        <label for="mce-MMERGE7-zip">Postal / Zip Code</label>
        <input type="text" value="" maxlength="10" name="MMERGE7[zip]" id="mce-MMERGE7-zip" class="">
    </div>
    <div class="mc-field-group size1of2">
        <label for="mce-MMERGE7-country">Country</label>
        <select name="MMERGE7[country]" id="mce-MMERGE7-country" class=""><option value="164" selected>USA</option><option value="286">Aaland Islands</option><option value="274">Afghanistan</option><option value="2">Albania</option><option value="3">Algeria</option><option value="178">American Samoa</option><option value="4">Andorra</option><option value="5">Angola</option><option value="176">Anguilla</option><option value="175">Antigua And Barbuda</option><option value="6">Argentina</option><option value="7">Armenia</option><option value="179">Aruba</option><option value="8">Australia</option><option value="9">Austria</option><option value="10">Azerbaijan</option><option value="11">Bahamas</option><option value="12">Bahrain</option><option value="13">Bangladesh</option><option value="14">Barbados</option><option value="15">Belarus</option><option value="16">Belgium</option><option value="17">Belize</option><option value="18">Benin</option><option value="19">Bermuda</option><option value="20">Bhutan</option><option value="21">Bolivia</option><option value="325">Bonaire, Saint Eustatius and Saba</option><option value="22">Bosnia and Herzegovina</option><option value="23">Botswana</option><option value="181">Bouvet Island</option><option value="24">Brazil</option><option value="180">Brunei Darussalam</option><option value="25">Bulgaria</option><option value="26">Burkina Faso</option><option value="27">Burundi</option><option value="28">Cambodia</option><option value="29">Cameroon</option><option value="30">Canada</option><option value="31">Cape Verde</option><option value="32">Cayman Islands</option><option value="33">Central African Republic</option><option value="34">Chad</option><option value="35">Chile</option><option value="36">China</option><option value="185">Christmas Island</option><option value="37">Colombia</option><option value="204">Comoros</option><option value="38">Congo</option><option value="183">Cook Islands</option><option value="268">Costa Rica</option><option value="275">Cote D'Ivoire</option><option value="40">Croatia</option><option value="276">Cuba</option><option value="298">Curacao</option><option value="41">Cyprus</option><option value="42">Czech Republic</option><option value="318">Democratic Republic of the Congo</option><option value="43">Denmark</option><option value="44">Djibouti</option><option value="289">Dominica</option><option value="187">Dominican Republic</option><option value="45">Ecuador</option><option value="46">Egypt</option><option value="47">El Salvador</option><option value="48">Equatorial Guinea</option><option value="49">Eritrea</option><option value="50">Estonia</option><option value="51">Ethiopia</option><option value="189">Falkland Islands</option><option value="191">Faroe Islands</option><option value="52">Fiji</option><option value="53">Finland</option><option value="54">France</option><option value="193">French Guiana</option><option value="277">French Polynesia</option><option value="56">Gabon</option><option value="57">Gambia</option><option value="58">Georgia</option><option value="59">Germany</option><option value="60">Ghana</option><option value="194">Gibraltar</option><option value="61">Greece</option><option value="195">Greenland</option><option value="192">Grenada</option><option value="196">Guadeloupe</option><option value="62">Guam</option><option value="198">Guatemala</option><option value="270">Guernsey</option><option value="63">Guinea</option><option value="65">Guyana</option><option value="200">Haiti</option><option value="66">Honduras</option><option value="67">Hong Kong</option><option value="68">Hungary</option><option value="69">Iceland</option><option value="70">India</option><option value="71">Indonesia</option><option value="278">Iran</option><option value="279">Iraq</option><option value="74">Ireland</option><option value="323">Isle of Man</option><option value="75">Israel</option><option value="76">Italy</option><option value="202">Jamaica</option><option value="78">Japan</option><option value="288">Jersey  (Channel Islands)</option><option value="79">Jordan</option><option value="80">Kazakhstan</option><option value="81">Kenya</option><option value="203">Kiribati</option><option value="82">Kuwait</option><option value="83">Kyrgyzstan</option><option value="84">Lao People's Democratic Republic</option><option value="85">Latvia</option><option value="86">Lebanon</option><option value="87">Lesotho</option><option value="88">Liberia</option><option value="281">Libya</option><option value="90">Liechtenstein</option><option value="91">Lithuania</option><option value="92">Luxembourg</option><option value="208">Macau</option><option value="93">Macedonia</option><option value="94">Madagascar</option><option value="95">Malawi</option><option value="96">Malaysia</option><option value="97">Maldives</option><option value="98">Mali</option><option value="99">Malta</option><option value="207">Marshall Islands</option><option value="210">Martinique</option><option value="100">Mauritania</option><option value="212">Mauritius</option><option value="241">Mayotte</option><option value="101">Mexico</option><option value="102">Moldova, Republic of</option><option value="103">Monaco</option><option value="104">Mongolia</option><option value="290">Montenegro</option><option value="294">Montserrat</option><option value="105">Morocco</option><option value="106">Mozambique</option><option value="242">Myanmar</option><option value="107">Namibia</option><option value="108">Nepal</option><option value="109">Netherlands</option><option value="110">Netherlands Antilles</option><option value="213">New Caledonia</option><option value="111">New Zealand</option><option value="112">Nicaragua</option><option value="113">Niger</option><option value="114">Nigeria</option><option value="217">Niue</option><option value="214">Norfolk Island</option><option value="272">North Korea</option><option value="116">Norway</option><option value="117">Oman</option><option value="118">Pakistan</option><option value="222">Palau</option><option value="282">Palestine</option><option value="119">Panama</option><option value="219">Papua New Guinea</option><option value="120">Paraguay</option><option value="121">Peru</option><option value="122">Philippines</option><option value="221">Pitcairn</option><option value="123">Poland</option><option value="124">Portugal</option><option value="126">Qatar</option><option value="315">Republic of Kosovo</option><option value="127">Reunion</option><option value="128">Romania</option><option value="129">Russia</option><option value="130">Rwanda</option><option value="205">Saint Kitts and Nevis</option><option value="206">Saint Lucia</option><option value="324">Saint Martin</option><option value="237">Saint Vincent and the Grenadines</option><option value="132">Samoa (Independent)</option><option value="227">San Marino</option><option value="255">Sao Tome and Principe</option><option value="133">Saudi Arabia</option><option value="134">Senegal</option><option value="326">Serbia</option><option value="135">Seychelles</option><option value="136">Sierra Leone</option><option value="137">Singapore</option><option value="302">Sint Maarten</option><option value="138">Slovakia</option><option value="139">Slovenia</option><option value="223">Solomon Islands</option><option value="140">Somalia</option><option value="141">South Africa</option><option value="257">South Georgia and the South Sandwich Islands</option><option value="142">South Korea</option><option value="311">South Sudan</option><option value="143">Spain</option><option value="144">Sri Lanka</option><option value="293">Sudan</option><option value="146">Suriname</option><option value="225">Svalbard and Jan Mayen Islands</option><option value="147">Swaziland</option><option value="148">Sweden</option><option value="149">Switzerland</option><option value="285">Syria</option><option value="152">Taiwan</option><option value="260">Tajikistan</option><option value="153">Tanzania</option><option value="154">Thailand</option><option value="233">Timor-Leste</option><option value="155">Togo</option><option value="232">Tonga</option><option value="234">Trinidad and Tobago</option><option value="156">Tunisia</option><option value="157">Turkey</option><option value="158">Turkmenistan</option><option value="287">Turks &amp; Caicos Islands</option><option value="159">Uganda</option><option value="161">Ukraine</option><option value="162">United Arab Emirates</option><option value="262">United Kingdom</option><option value="163">Uruguay</option><option value="165">Uzbekistan</option><option value="239">Vanuatu</option><option value="166">Vatican City State (Holy See)</option><option value="167">Venezuela</option><option value="168">Vietnam</option><option value="169">Virgin Islands (British)</option><option value="238">Virgin Islands (U.S.)</option><option value="188">Western Sahara</option><option value="170">Yemen</option><option value="173">Zambia</option><option value="174">Zimbabwe</option></select>
    </div>
</div>
<div class="mc-field-group">
    <label for="mce-COLLECTION">Collection  <span class="asterisk">*</span>
</label>
    <select name="COLLECTION" class="required" id="mce-COLLECTION">
    <option value=""></option>
    <option value="Aquamarine Ocean">Aquamarine Ocean</option>
<option value="Breuer Minimalist">Breuer Minimalist</option>
<option value="Flieger Pilot">Flieger Pilot</option>

    </select>
</div>
<div class="mc-field-group size1of2">
    <label for="mce-SERIAL">Serial #  <span class="asterisk">*</span>
</label>
    <input type="number" name="SERIAL" class="required" value="" id="mce-SERIAL">
</div>
<div class="mc-field-group size1of2">
    <label for="mce-DATE2-month">Purchase Date  <span class="asterisk">*</span>
</label>
    <div class="datefield">
        <span class="subfield dayfield"><input class="datepart required" type="text" pattern="[0-9]*" value="" placeholder="DD" size="2" maxlength="2" name="DATE2[day]" id="mce-DATE2-day"></span> / 
        <span class="subfield monthfield"><input class="datepart required" type="text" pattern="[0-9]*" value="" placeholder="MM" size="2" maxlength="2" name="DATE2[month]" id="mce-DATE2-month"></span> / 
        <span class="subfield yearfield"><input class="datepart required" type="text" pattern="[0-9]*" value="" placeholder="YYYY" size="4" maxlength="4" name="DATE2[year]" id="mce-DATE2-year"></span>
        <span class="small-meta nowrap">( dd / mm / yyyy )</span>
    </div>
</div>
<p>
    <label>Purchase Date</label>
    <input type="date" name="DATE2" required="">
</p>

      <div id="mce-responses" class="clear">
        <div class="response" id="mce-error-response" style="display:none"></div>
        <div class="response" id="mce-success-response" style="display:none"></div>
    </div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
    <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_7380fc5b9f7c07aeda2daf1d4_fa42da546a" tabindex="-1" value=""></div>
    <div class="clear"><input type="submit" value="Register" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </div>

</div>
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script><script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';fnames[0]='EMAIL';ftypes[0]='email';fnames[7]='MMERGE7';ftypes[7]='address';fnames[4]='COLLECTION';ftypes[4]='dropdown';fnames[3]='SERIAL';ftypes[3]='number';fnames[5]='DATE2';ftypes[5]='date';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
<!--End mc_embed_signup-->

Technical info

arnelap commented 6 years ago

Hi Jev,

Please use 1 channel at a time to contact us, if you create a ticket via the forum or via email support there is no need to also create an issue here.

We only use git for development related issues. For free support please create a ticket at https://wordpress.org/support/plugin/mailchimp-for-wp

It seems you copied the code from a MailChimp form to our form builder. While this might work, it's not how our plugin is intended to work. We advice to build the form trough our form builder with the buttons on top...

Anyhow, in this case, I think the error has to do with the use of the field of the type "address". Mailchimp is very strict on the verification on this type of date, and only accepts the address if everything is filled correctly (zip, state, country, all of it). If one of the fields is missing it will not save any of the submitted data. Therefor we decided to make this type of field always required, while we are thinking about a better solution.

My suggestion is to not use this type of field at all, and instead make normal text fields for each part of the address that you would like to capture. That way we won't have these issues and you will capture whatever the subscriber filled, even if the zip doesn't validate or the country is missing or what not.

You can follow the issue here: https://github.com/ibericode/mailchimp-for-wordpress/issues/498

Hope that helps.