• Resolved caiobleggi

    (@caiobleggi)


    Hello, I’m using a file upload field at Contact form 7 and the plugin generates by default two invalid html5 attributes at the input tag…

    “Error Line xxx, Column xxx: Attribute size not allowed on element input at this point.
    …ame=”file” id=”curriculo” class=”wpcf7-file” size=”40″ value=”1″ /></span>
    “Error Line xxx, Column xxx: Attribute value not allowed on element input at this point.
    …ame=”file” id=”curriculo” class=”wpcf7-file” size=”40″ value=”1″ /></span>

    I tried to remove it with javascript but the w3c validation happens before the document.ready function fix it.

    There’s any suggestions? I need to validate it!

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just edit modules/file.php as you like.

    Thread Starter caiobleggi

    (@caiobleggi)

    Thank You, resolved!

    If you just want to change the value of size field there’s a parameter you can add in the back-end which will allow you to change size attribute:

    [file* file-123 1x]

    This one will set size=1, 5x would be size=5 and so on.

    (Edited – sorry – this solution won’t help if you want to completely get ridy of the attributes).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Contact Form 7] File Upload Input not HTML 5 valid’ is closed to new replies.