> How to adjust the text field size in Edit or Create form, I want to
> enlarge the field size.
Specify something like the following in your controller:
config.columns[:textfield_name].options = { :size => 80 }
config.columns[:textarea_name].options = { :cols => 60, :rows => 10 }
> When I add "config.columns[:textfield_name].options = { :size => 80 }"
> in my code.
>
> The text field size is not change. It is still 20.
Are you using a helper or partial override for the column? If so, you
need to make the change in the override. If not, then is the column a
real or virtual column? It looks like column options are not merged for
virtual columns.
> It is a real column, and I am not override it in helper.
>
> Hi Sri Sri,
>
> I am not find the set width in .css file. I just find some font size
> and format setting.
>
> Ruby 1.8.6
> Rails 2.0.2
> Active Scaffold 1.1.1
Looking at the diffs between 1.1.1 and later versions it looks like
you'll likely need to modify lib/helpers/form_column_helpers.rb to get
the expected behavior.
Look at #active_scaffold_input_text_options and delete the line that
hard-sets the size to 20:
options[:size] = 20
That line is not even in later versions of form_column_helpers and it
does not look to me like it needs to be in the 1.1.1 version either, but
I could be wrong. You could always change '=' to '||=' if you wanted to
be really safe.