Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've got a view in the admin area of my site showing an overview of content with multiple exposed filters. If I do a form alter, I can see the #size attribute of these filters is 30, but the markup that gets produced is (notice the empty size attritbute):
<input class="fluid form-text" type="text" id="edit-field-user-fname-value" name="field_user_fname_value" value="" size="" maxlength="128">
This isn't an issue in modern browsers, but IE8 treats this very differently and makes the text field tiny. I've tried hunting for the template that outputs this but can't seem to find it. This seems like a bug to me.
Comments
Comment #1
acbramley CreditAttribution: acbramley commentedOk, this isn't views, this is rubik, caused by this code:
Comment #2
acbramley CreditAttribution: acbramley commentedWork around for this is to implement hook_preprocess_textfield in a custom module and set the size to lower than 20, or a field_prefix/suffix.
Comment #3
kyletaylored CreditAttribution: kyletaylored commentedWeird, not sure why that's set to empty, to be honest. I patched it to the default HTML setting of 20.