• Resolved gyroscopic

    (@gyroscopic)


    Hi, just added a form via a template and all looks great but as soon as I select an input field (either name or email) the form submits and redirects to 401.

    First I have told the form NOT to redirect and second how do I stop it from submitting until I hit the submit button?

    Heres the form code…

    <h2>Subscribe to our mailing list</h2>
    <p>
    	<label for="mc4wp_name">Name</label>
    	<input id="mc4wp_name" name="NAME" type="text" placeholder="Your name">
    </p>
    <p>
    	<label for="mc4wp_email">Email Address <span class="asterisk">*</span></label>
    	<input type="email" id="mc4wp_email" name="EMAIL" required placeholder="Your email address" />
    </p>
    
    <p><input type="submit" value="Subscribe" /></p>

    Am using the latest plugin version 1.4.8

    http://ww.wp.xz.cn/plugins/mailchimp-for-wp/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hello.

    That should not happen at all. Your form mark-up looks OK, no problems there. Do you have a live URL for me to take a look at?

    Maybe another (form) element on the page is not properly closed or some JavaScript is conflicting. I’d have to take a look at your website to find out what the issue is.

    Thanks.

    Danny

    Thread Starter gyroscopic

    (@gyroscopic)

    Hi Danny

    All fixed. I’m amending a clients original theme and it had a script which made the whole form clickable via a class. Removed the class and the form now works.

    BTW as I have set it to not redirect I dont see the confirmation message anywhere – should these display in the form?

    Also thanks for the quick reply!

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    Good! Glad you figured that part out.

    If you’re not using a redirect (which is default), the form should just show the default success or error messages set in MailChimp for WP > Forms.

    I take it they aren’t? Is your redirect field empty?

    Thread Starter gyroscopic

    (@gyroscopic)

    I put a zero ‘0’ in the redirect field, and have also tried it empty. The messages are all the default ones so far – but still nothing in the form.

    Thread Starter gyroscopic

    (@gyroscopic)

    Ok the messages are there just overflow was hidden.

    I would like to just enter a name field without using firstname or lastname is this an option?

    Plugin Author Danny van Kooten

    (@dvankooten)

    Good. Shouldn’t be an issue caused by my plugin indeed, glad you figured it out.

    Sure. If your list uses FNAME and LNAME to store the first- and lastname of a subscriber, just include a NAME field in your form.

    The plugin will automatically split this field into FNAME and LNAME.

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

The topic ‘Form submitting when input selected!’ is closed to new replies.