When setting up a textfield with a relatively small data length, the textfield should be shrunk to represent this length. This is particularly true when entering post or zip codes which look odd if they are being put into an 80 char text input box.

Comments

ullgren’s picture

The textfield will now be set to size == maxlength if the maxlength is <50.
For maxlength > 50 the size will be set to 50.

lba’s picture

Could it be you forgot to commit your fix to head?

Thx,
Luc

ullgren’s picture

Assigned: Unassigned » ullgren
Category: feature » bug

Nope ... should be there in the 4.4 branch aswell.
If setting the extra field to a number for the textfield component this is
used to set the maxsize and, if it is below 50, the size of the textfield.

default:  // textfield
    $maxsize = 255;
    if ($extra && is_numeric($extra)) {
      $maxsize = $extra;
    }
    return html_form_textfield('', $name, $value, ($maxsize>50?50:$maxsize), $maxsize).
      ($err?html_br().$err:'');
    break;
  }
Anonymous’s picture