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.
Attached you'll find the patch for making the form element, form_field(), form_autocomplete() and form_textarea() consistent in size..
I used:
form_autocomplete() and form_textfield():
for numbers: width of 5;
for small textfields: width of 15 or 30;
for textfields settings, titles etc: width of 60;
form_textarea()
small textarea's: width 60, height 5 rules;
medium textarea's: width 60, height 15 rules;
large textarea's (node submission body's): width 60, height 20 rules;
please review and apply patch... I this is - for the sake of consistency - a very fine patch..
Comment | File | Size | Author |
---|---|---|---|
form_size_consistency.patch | 69.9 KB | Stefan Nagtegaal | |
Comments
Comment #1
wnoronha CreditAttribution: wnoronha commentedI think this is a good idea, good way to standardize the UI.
+1
Comment #2
Dries CreditAttribution: Dries commentedCommitted to HEAD. I suggest we document the defaults in the PHPdoc comments. Guidelines are in order to avoid inconsistency creeping in. I'm not marking this fixed yet.
Comment #3
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedDries, I am not against documenting this, but where? Should I document this in the new form API from Adrian?
Stefan
Comment #4
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI think the defaults should be documented in the phpdoc comments for each form element in form.inc.
Comment #5
magico CreditAttribution: magico commentedI agree with killes. I've checked in form.inc and couldn't find any info about this.
Comment #6
chx CreditAttribution: chx commentedAt this moment we do not have phpdoc in form.inc for form elements. If we will have then we will doc this, too.