input size=60 is too big (for most themes)for the file upload component. Not easy to find where to change this.
As a matter of fact, where would a person change this?
input size=60 is too big (for most themes)for the file upload component. Not easy to find where to change this.
As a matter of fact, where would a person change this?
Comments
Comment #1
molly_n commentedOverriding with CSS works for IE and Opera:
But that doesn't seem to work in Firefox.
Instead, you can override Drupal's theme_file function, by adding something like the following to your theme's template.php:
You can change the size value to something that works for your theme. This method will, of course, impact all file input fields on your site.
Comment #2
quicksketchComment #3
traviscarden commentedYou can be a little more selective in your override, too. Here's code for Webform 6.x-3.x that overrides the default file upload field width only 1) for Webform components 2) where a width hasn't been specified for the instance in the GUI. It goes in your theme's
template.phpfile.Comment #4
calbasiCould anybody provide the code for 7.x?
Comment #5
traviscarden commentedSomething like this will do the trick for you, @calbasi. (Note that it will override all file fields rendered using this theme—not just those on Webforms. I don't immediately see a way to target that way in D7.)