WordPress.org

Forums

Contact Form 7
No way to define attachment input size? (7 posts)

  1. Buovjaga
    Member
    Posted 2 years ago #

    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/

  2. fcvolunteer
    Member
    Posted 2 years ago #

    What's your url?

  3. Buovjaga
    Member
    Posted 2 years ago #

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

  4. fcvolunteer
    Member
    Posted 2 years ago #

    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

  5. Buovjaga
    Member
    Posted 2 years ago #

    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.

  6. fcvolunteer
    Member
    Posted 2 years ago #

    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

  7. Buovjaga
    Member
    Posted 2 years ago #

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

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

Tags

No tags yet.