Just in has asked for the wisdom of the Perl Monks concerning the following question:

How exactly do you use HTML::Widget::Plugin::Combo; ?

The docs and google don't explain much. If it matters I'm trying to get it working with CGI::Pretty - warnings and strict are enabled, along with CGI::Carp qw(warningsToBrowser fatalsToBrowser).

I'd like a working example from any of you that are able to decipher its usage. I'm currently poking around in the module itself, but havent been able to figure out what $factory should be.

As of now I'm guessing that I should be calling combo with 2 hash references like so (?) :-

combo({}, {id => 'combo_box'})

Most humbly,
Just in
  • Comment on How do you use HTML::Widget::Plugin::Combo;

Replies are listed 'Best First'.
Re: How do you use HTML::Widget::Plugin::Combo;
by Anonymous Monk on Sep 06, 2007 at 08:35 UTC
      Yeah well . . . I'll continue looking at the .pm and .t but it still doent help. The .t is convoluted with isa calls that are throwing me off . . .
        Stop looking and read docs :)

        From the test

        { # make a select field with AoA options my ($html, $tree) = widget(select => { options => [ [ '' => 'Flavorless', ], [ minty => 'Peppermint', ], [ perky => 'Fresh and Warm', ], [ super => 'Red and Blue', ], ], name => 'flavor', value => 'minty', });
        for you to try
        { my $factory = HTML::Widget::Factory->new(); my $html = = $factory->combo({ id => 'required', options => [ [ '' => 'Flavorless', ], [ minty => 'Peppermint', ], [ perky => 'Fresh and Warm', ], [ super => 'Red and Blue', ], ], name => 'flavor', value => 'minty', });