Gossamer Forum
Home : Products : Gossamer Links : Discussions :

how do we adjust textarea size and cols

Quote Reply
how do we adjust textarea size and cols
This is probably one of those silly questions, but I couldn't find it in the forum.
I can't figure out how to define the row value for textarea columns within the size definition field of the database.
It only seems to allow for one value which gets interpreted as the col value. I've Tried using the 40x15, 40,15 (40,15) [40,15] - No matter what I do, they come back totally wacked, or with 4 rows.

Getting exhausted. Anyone know?

thanks and peace.


Quote Reply
Re: how do we adjust textarea size and cols In reply to
Have you tried '40x15'?

Regards,

Eliot Lee
Quote Reply
Re: how do we adjust textarea size and cols In reply to
Hi,

You can't unfortunately. I'll fix this up in the next release. For now, you need to manually edit the .def file and put:

form_size => [50,5]

to set it.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: how do we adjust textarea size and cols In reply to
Well,

Unfortunately, I can't have all my textareas that size, a couple need to be really large.
So I did this instead - Am I creating any other problem doing the following - it seems to be working fine so far.

in HTML.pm
in sub textarea
I changed
------------------------------------------------------------
$size ||= 20;
my ($cols, $rows) = (ref $size) ? (@{$size}) : ($size, 4);
------------------------------------------------------------
to the following:
------------------------------------------------------------
$size ||= "20,4";
my ($cols, $rows) = split(/,/,$size);
$rows ||= 4;
------------------------------------------------------------
I'm splitting on a comma, which means that in the properties Size field I enter 40,25
but I suppose you could change that to an x or an X
the first $size sets up the cols and rows if the $size column is left entirely blank.
If there's just the default 30, then we need
to set a default $row size which is what the $rows ||= after the split is for.
otherwise the split function seems to be working great and the info is retained after a resync.

It's the only change I've made to HTML.pm so when the upgrade arrives and this is fixed, I'll just use the one that gets installed without having to reinstall this file and I guess change my character I'm splitting on if it's not a ,

Feedback on this would be appreciated if this can or does cause any problems, or if there's a more elegant way of doing it.

Peace.

Quote Reply
Re: how do we adjust textarea size and cols In reply to
Hi,

That should work fine. I don't see any problems with it.

Cheers,

Alex

--
Gossamer Threads Inc.