Contact Form 7
[resolved] File Upload Input not HTML5 valid (value, size error) (3 posts)

  1. Cri85
    Posted 2 years ago #

    Hello, i have found this topic with same problem: http://wordpress.org/support/topic/plugin-contact-form-7-file-upload-input-not-html-5-valid?replies=4 but the solution is not explained.

    I'm using a file upload field at Contact form 7.

    This is the result of W3C validation service:

    Line ***, Column ***: Attribute value not allowed on element input at this point.
    value="1" size="40" class="wpcf7-form-control wpcf7-file cf-file" /></span></p>

    Line ***, Column ***: Attribute size not allowed on element input at this point.
    …value="1" size="40" class="wpcf7-form-control wpcf7-file cf-file" /></span></p>

    How can i validate this page?


  2. Cri85
    Posted 1 year ago #

    Up! No solution?

  3. Cri85
    Posted 1 year ago #

    Ok i have found a solution:

    Edit contact-form-7/modules/file.php to remove or /* comment */ 2 line:

    $atts['size'] = $tag->get_size_option( '40' );

    $atts['value'] = '1';

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic