Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Passing a value to a Global

Quote Reply
Passing a value to a Global
I need some help... Crazy... I have the following global (its the select category global for multi-cats on add form and modify form).

sub {
my $db = $DB->table ('Category');
$db->select_options( 'order by Full_Name' );
my $sth = $db->select ( ['ID', 'Full_Name'] ,{ add_form_type => '$query'});
my %res = ();
my @order;
while (my ($id, $name) = $sth->fetchrow_array) {
$res{$id} = $name;
push @order, $id;
}

my $opts = {
name => 'CatLinks.CategoryID',
-options => \%res,
-multiple => 1,

-order => \@order,

size => 5,
};
my $tags = shift;
require HTML;
return HTML::select( $tags, $opts );
}


I am trying to pass in the $query value via a URL... http://mysite.com/.../add.cgi?query=VALUE

Any feedback would be awesome. Sly

Thanks,

funodie Tongue
Quote Reply
Re: [funodie] Passing a value to a Global In reply to
Found solution... later... funodie