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

Re: [Jonze] The dreaded Multiselect form on input_form.html

Quote Reply
Re: [Jonze] The dreaded Multiselect form on input_form.html In reply to
Hi,

You could try this global:

Code:
sub {
my $column = $_[0];
my $selected = $_[1];
my $table = $DB->table("Users");
my %hash;
my $i = 0;
my $names = $table->form_names->{$column};
my $vals = sort $table->form_values->{$column};
for my $val (@$vals) {
$hash{$val} = $names->[$i++];
}
my $html = $DB->html($table, $IN);
my $form = $html->select({
name => "$column",
values => \%hash,
multiple => 1,
value => $selected });
return $form;
}

<%global_name('features',$features)%>

I use that most of the time for really annoying (i.e long =)) SELECT box lists <G>

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread The dreaded Multiselect form on input_form.html Jonze 4745 Mar 27, 2007, 7:47 PM
Post Re: [Jonze] The dreaded Multiselect form on input_form.html
VishalT 4677 Mar 27, 2007, 7:58 PM
Thread Re: [Jonze] The dreaded Multiselect form on input_form.html
brewt 4705 Mar 27, 2007, 8:11 PM
Thread Re: [brewt] The dreaded Multiselect form on input_form.html
Jonze 4654 Mar 28, 2007, 7:44 AM
Thread Re: [Jonze] The dreaded Multiselect form on input_form.html
Andy 4679 Mar 28, 2007, 8:24 AM
Thread Re: [Andy] The dreaded Multiselect form on input_form.html
Jonze 4640 Mar 28, 2007, 8:37 AM
Thread Re: [Jonze] The dreaded Multiselect form on input_form.html
Andy 4684 Mar 28, 2007, 8:44 AM
Post Re: [Andy] The dreaded Multiselect form on input_form.html
Jonze 4645 Mar 28, 2007, 9:02 AM
Post Re: [Andy] The dreaded Multiselect form on input_form.html
Jonze 4585 Mar 29, 2007, 11:42 AM
Thread Re: [Jonze] The dreaded Multiselect form on input_form.html
brewt 4626 Mar 28, 2007, 11:07 AM
Post Re: [brewt] The dreaded Multiselect form on input_form.html
Jonze 4632 Mar 28, 2007, 2:27 PM