Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Alex] Plugin User set options:: Edit Log

Here is the list of edits for this post
Re: [Alex] Plugin User set options:
Alex,

Here is a possible solution of the missing feature. Well, it just corrects the TEXT input field problem, and only uses, the form_size key. If we would also want to use the other keys (default and type), then I would suggest other solution.
Could be easily correct the missing features from other types, like TEXTAREA or SELECT, etc, if there are missing, unimplemented features.

So to be able to resize the input TEXT form size, when installing plugin user options, you need this modification. It reads the first line of the Names field (the 5. parameter in plugin cfg, user options: 'user' => [ '1','2','3','4', [ this], [] ] array. ), so you have to type there the TEXT form size.

Replace this code:
Code:
my $form_element = $HTML->$type({name => "user-$name", value => $val, values => $options});

To this code:
Code:
# mod start
my $type_params;
$type_params = { name => "user-$name", value => $val, values => $options };
$type eq 'text' and do ( $type_params = { name => "user-$name",
def => {form_size => "$names->[0]"}, value => $val, values => $options } );
my $form_element = $HTML->$type( $type_params );
# mod end

This is not the best soltution, but works.
Alex, if you would like, it can be improved to treat the other missing features.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 3, 2003, 4:23 AM

Edit Log: