WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form Clean and Simple
[resolved] Valid HTMl5 - Easy fix (4 posts)

  1. jontreefish
    Member
    Posted 4 months ago #

    Just a small suggestion/fix. In contact-form.view.php there are a few span's with the 'for' attribute. The for attribute should only really be on the label elements, as such it is resulting in a validation error. If you could remove the 'for' attributes from the span elements in the next update it would be muchley appreciated.

    Keep up the good work! It's a fantastically useful plugin :-)

    https://wordpress.org/plugins/clean-and-simple-contact-form-by-meg-nicholas/

  2. megnicholas
    Member
    Plugin Author

    Posted 4 months ago #

    Hi there.

    Unfortunately I can't take out the 'for' attributes as the form validation jquery script requires it to be there.

  3. jontreefish
    Member
    Posted 4 months ago #

    Hi Meg,

    Thanks for the quick reply.

    Found a fix.

    in jquery.validate.contact.form.js

    Change :
    $errele = $form.find("div[for='cscf_" + name +"']");

    to

    $errele = $form.find("div[id='error_cscf_" + name +"']");

    And then in contact.form.view.php

    change spans from

    for="csrf_email"

    to

    id="error_csrf_email" etc

    All the best

    Jon

  4. jontreefish
    Member
    Posted 4 months ago #

    Ignore that. It doesn't work as hoped! Will keep trying!

Reply

You must log in to post.

About this Plugin

About this Topic