Forums

[resolved] [Plugin: Contact Form 7] File Upload Input not HTML 5 valid (4 posts)

  1. caiobleggi
    Member
    Posted 8 months ago #

    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

  2. Takayuki Miyoshi
    Member
    Posted 8 months ago #

    Just edit modules/file.php as you like.

  3. caiobleggi
    Member
    Posted 8 months ago #

    Thank You, resolved!

  4. Andrzej Zglobica
    Member
    Posted 4 months ago #

    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).

Reply

You must log in to post.

About this Topic