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

CommentFileSizeAuthor
form_size_consistency.patch69.9 KBStefan Nagtegaal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wnoronha’s picture

I think this is a good idea, good way to standardize the UI.

+1

Dries’s picture

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

Stefan Nagtegaal’s picture

Dries, I am not against documenting this, but where? Should I document this in the new form API from Adrian?

Stefan

killes@www.drop.org’s picture

Status: Needs review » Active

I think the defaults should be documented in the phpdoc comments for each form element in form.inc.

magico’s picture

I agree with killes. I've checked in form.inc and couldn't find any info about this.

chx’s picture

Status: Active » Closed (won't fix)

At this moment we do not have phpdoc in form.inc for form elements. If we will have then we will doc this, too.