param returns a single value, by design, because this avoids the context
sensitivity bug that led to for example
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1572. To get
multiple values, use every_param, which returns an array reference:
my $groups = $c->every_param('groupMemberships');
-Dan
On Sun, Mar 1, 2020 at 3:46 PM mab974 wrote:
> Hi,
>
> How do I get multiple checkbox values as an array?
> I always get the value of the last checked checkbox.
>
>
> my example :
> in template
>
> %= check_box 'groupMemberships' => $groupname
>
> or when checked
>
>
>
> and in controller
>
> my @groups = $c->param('groupMemberships');
>
> Thanks in advance.
>
> Regards,
>
> -*-
> mab974
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/20200302002747.9c63598aae28de1f8a08e4ab%40gmail.com
> .
>
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to mojolicious+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mojolicious/CABMkAVUHD3RYQChd0wNQLNs9ENVoxePNFeUug3At_eHy8L2k7Q%40mail.gmail.com.