Upcase

Hi

I am having one form there around 30 text field is there.after
submitting the form the details should be save in database in capital
letter.
i tried with CSS text-transform:uppercase;
but in frontend it showing capital letter but in database it save in
small letter is any one knows please help…

I NEED TO SAVE IN DATABASE WITH CAPITAL LETTER.

before_save do |record|
record.field = record.field.upcase
end

Also, please only post once.

babu nair wrote:

I NEED TO SAVE IN DATABASE WITH CAPITAL LETTER.

Google for [ActiveRecord before_save]

babu nair wrote:

i tried with CSS text-transform:uppercase;
but in frontend it showing capital letter but in database it save in
small letter is any one knows please help…

I NEED TO SAVE IN DATABASE WITH CAPITAL LETTER.

BTW you should not save anything in ALL CAPS. They are tacky, and will
make your
program look like an obsolete COBOL form-letter experience, courtesy of
your
friendly neighborhood government bureaucracy.

If you actually have a client requesting this incompetent feature, save
them
from themselves by storing the text the way the user entered it, (and
don’t use
CSS to transform it, because they won’t see their mistakes). Then
display the
text using a transformation.

If you transform and then save, your program will have bugs when your
users
enter ligated characters in titlecase, such as an Ae stuck together.


Phlip