in reply to Re^3: Perl CGI checkbox_group submit error
in thread Perl CGI checkbox_group submit error

Hi Guys, my boss don't want me to update CPAN out of fear of regression testing other applications using current cpan version 3.00. Any other ideas on how to use current CPAN version to get my code to work. So far I haven't seen any other solution yet.

  • Comment on Re^4: Perl CGI checkbox_group submit error

Replies are listed 'Best First'.
Re^5: Perl CGI checkbox_group submit error
by poj (Abbot) on Jul 16, 2013 at 10:18 UTC
    Try the example script from the docs ;
    #!/usr/local/bin/perl -w use CGI qw/:standard/; print header, start_html('Simple Script'), h1('Simple Script'), start_form, "What's your name? ",textfield('name'),p, "What's the combination?", checkbox_group(-name=>'words', -values=>['eenie','meenie','minie','moe'], -defaults=>['eenie','moe']),p, "What's your favorite color?", popup_menu(-name=>'color', -values=>['red','green','blue','chartreuse']),p, submit, end_form, hr,"\n"; if (param) { print "Your name is ",em(param('name')),p, "The keywords are: ",em(join(", ",param('words'))),p, "Your favorite color is ",em(param('color')),".\n"; } print end_html;
    poj

      Hi poj thanks for your reply, but I need to be able to submit an array of values eg. values=>\@array which does not currently work. It will work with -values=>'eenie','meenie','minie','moe', but the former is what I want because of the dynamic values been created in \@array. Any other ideas?

        Just work through one change at a time from the working script to the failing one.
        If it works with -values=>['eenie','meenie','minie','moe'], try it with
        use CGI qw/:standard/; my @words = ('eenie','meenie','minie','moe'); print . . -values=>[@words],
        poj
Re^5: Perl CGI checkbox_group submit error
by Anonymous Monk on Jul 16, 2013 at 03:12 UTC

    So far I haven't seen any other solution yet.

    And you likely won't, sorry