WordPress.org

Support

Support » Plugins and Hacks » Contact Form 7 » [Plugin: Contact Form 7] No way to define attachment input size?

[Plugin: Contact Form 7] No way to define attachment input size?

  • Using v. 3.3 of Contact Form 7.
    CSS cannot override the size=”40″ attribute of the file attachment input field. This ability is needed for mobile friendly websites! There has to be an option in the plugin where the size is not defined by size=””, but width, so we can style it however we like.
    Thanks.

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 6 replies - 1 through 6 (of 6 total)
  • What’s your url?

    Can’t you verify yourself in your own install?
    Here is another thread about this issue, but it’s locked: http://wordpress.org/support/topic/plugin-contact-form-7-customize-file-attach-input?replies=5

    Chrome is a bit different it seems..

    Just trying to help…

    It works fine on my form which is why I asked for your url so I can see what’s happening on your form.

    You might want to install firebug which will allow you to view your css and make sure you’re using the write path names.

    I’ve successfully used

    .wpcf7-form .myclass input {
    width: 30px !important;
    }

    so it all depends on the correct

    I just tried with important, but no effect. Note, it is the file attachment input specifically.

    input.wpcf7-form-control.wpcf7-file {
        width: 70px !important;
    }

    I’ve used FF dev tools for now.. I’m also familiar with Firebug, but have not needed it for this.

    Sorry, I misunderstood that you were referring to the “file upload” form field.

    The thing that worked for me (though I’m not sure it’s the best solution as it can get overwritten with the next plugin update) is to go into the contact-form-7/modules/file.php file and find

    else
    		$atts .= ' size="40"'; // default size

    and change the 40 to whatever you want.

    Sorry, G’luck

    Yep, I thought about that, but I hope some developer is reading this and considering this as a bug report/feature request. Other people will take care of the WP site in question after I do these responsive design changes and it will be quite awkward to always hack the plugin core after updating..

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Contact Form 7] No way to define attachment input size?’ is closed to new replies.
Skip to toolbar