• Resolved Arnopello

    (@arnopello)


    Hi

    When putting a class on the submit <input>, the form doesn’t work anymore.
    I write this:
    <input type=”submit” value=”Je veux recevoir les nouveautés !” class=”et_pb_newsletter_button” />

    Without the “class=…”, the plugin works perfectly and when I add it, nothing work anymore. When I click, nothing move, I don’t get any message and the icon in my browser’s tab doesn’t animate.

    Here is the link (because I’m sure some JS impact your plugin) : http://test.lumeeq.com
    If that helps, I use the Divi theme from Elegant Themes.

    Regards

    https://wordpress.org/plugins/mailchimp-for-wp/

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

    (@dvankooten)

    Hi there,

    Your submit button is hidden in HTML comments and your actual submit button is an <a> element. Is that on purporse?

    The correct HTML should look something like this.

    <!-- Label doit rester, même caché, car permet la disparition du texte dans le champ au focus -->
    <p>
        <label style="display: none;">Adresse e-mail</label>
        <input type="text" name="EMAIL" value="Adresse e-mail" required="required">
    </p>
    <p>
        <label style="display: none;">Prénom</label>
        <input type="text" name="FNAME" value="Prénom" class="input">
    </p>
    <p>
        <label style="display: none;">Nom</label>
        <input type="text" name="LNAME" value="Nom">
    </p>
    <p style="margin-left:20%;">
        <span style="font-weight:bold;">Je suis interessé...</span>
        <label>
            <input type="radio" name="CATEGORIE" value="Particulier"><span>Pour <strong>moi-même</strong></span>
        </label>
        <label>
            <input type="radio" name="CATEGORIE" value="Entreprise"><span>Pour mon <strong>entreprise</strong></span>
        </label>
        <label>
            <input type="radio" name="CATEGORIE" value="Ecole"><span>Pour mon <strong>école</strong></span>
        </label>
    </p>
    
    <p>
        <input type="submit" value="Je veux recevoir les nouveautés !" class="et_pb_newsletter_button" />
    </p>

    It really shouldn’t make any difference if you add a class attribute to the submit button.

    Let me know if that solves the issue! 🙂

    Thread Starter Arnopello

    (@arnopello)

    Well, I think that there is some JS involved because classic CSS works like a charm. As I took back an existing class to take its settings, I think that it’s what is also linked to the JS which validate the form, as no <form> is involved.
    So i’ll create a specific class.

    Sorry for the disturbing.

    Thread Starter Arnopello

    (@arnopello)

    Hi

    You visited the website while I was doing some tests. If you check it now, you’ll see that I use the INPUT button. I polished it through CSS and I got the result I wanted.

    Thanks for your answer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Submit button doesn't work when adding a class’ is closed to new replies.