Where would I go to amend the length of a text input field with cck. At the moment they fill the width of the page, which looks ungainly if you only want to input (say) a zipcode

Comments

webpotato’s picture

That makes two of us. I'd also greatly appreciate knowing how to do this.

Anonymous’s picture

karens’s picture

Component: CCK in core » General
Status: Active » Closed (works as designed)

Fields that go all the way across the whole page are the default Drupal way of doing forms. Doing it differently is a matter of personal taste, and generally in CCK we just do things the standard 'Drupal' way.

The best way around this is to either do something with css in your theme or to form_alter the form and change the value, as done in the link above.

neroflick’s picture

usonian’s picture

Is this the final word on custom CCK field lengths? It's very frustrating not to be able to specify this via the web interface. The first thing clients ask us is, "Can we change the size of that field?" It would be so much more convenient all around to point them at the appropriate setting in the field form than to muck with the theme or write a custom module just to tweak a form property.

I'm happy to clone text.module and add a few lines to create a "text with field size" widget, but it seems like a shame to duplicate so much code to add such a basic feature.

yched’s picture

This has been added to CCK D6. CCK D5 will see no new feature.

ss54’s picture

Yatched, Even after upgrading to 6.19 I could not change it from (text field size) text box, until I changed it from

.node-form .form-text {
display: block;
width: 95%; => 40% and it worked
}

When I changed it from the above text box, for example, to 40 it did not change, until I used the above method. The problem with this, it changed all the text fields not specific fields. Any idea, thanks

alanwsl’s picture

Just set the width to auto will do

.node-form .form-text {
display: block;
width: Auto;
}