Support » Plugin: Contact Form Clean and Simple » Valid HTMl5 – Easy fix

  • Resolved jontreefish

    (@jontreefish)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author megnicholas

    (@megnicholas)

    Hi there.

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

    jontreefish

    (@jontreefish)

    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

    jontreefish

    (@jontreefish)

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Valid HTMl5 – Easy fix’ is closed to new replies.