[MTOS-dev] multiple checkboxes, app->param
Jay Allen
jay at endevver.com
Fri May 9 15:39:13 PDT 2008
What Mark said. You can search the MT code base for the following
which is demonstrative of this:
my @ids = $app->param("id");
Also, when in doubt, do a "perldoc extlib/CGI". The POD is huge but
extremely informative about features that are available to you via the
venerable CGI module.
Also, wrt Data::Dumper, you should try to always pass it references or
objects and not arrays or hashes (e.g. Dumper(\@uris) ). Also, I
would never use MT::Log for this because it's post-processed. Instead
print to STDERR or Log4mt.
--
Jay Allen
Endevver Consulting
415-200-6985
On May 9, 2008, at 9:40 AM, Mark Carey wrote:
> On Fri, May 9, 2008 at 11:20 AM, Steve Ivy <steveivy at gmail.com> wrote:
>>> my @uris = $app->param('uris');
>>>
>>> Correct?
>
> Yes, this works for me. I use it in a few of my plugins.
>
> However, in my (limited) experience....
>
>>> MT->log(Dumper(@uris));
>
> ...will only dump the first element of the array to the log, even if
> there are multiple elements. That said, I am not an expert with
> data::dumper. I am sure there is a better way, but do this:
>
> foreach my $uri (@uris) {
> MT->log(Dumper($uri));
> }
>
> -Mark
> _______________________________________________
> MTOS-dev mailing list
> MTOS-dev at sixapart.com
> http://www.sixapart.com/mailman/listinfo/mtos-dev
More information about the MTOS-dev
mailing list