0
  my $warranty_dates  = $self->every_param('warranty_date');
  my $state_ids       = $self->every_param('state_id');

results in:

   $VAR1 = undef;

and

  $VAR1 = '12/12/2017';
  $VAR2 = '12/12/2017';
  $VAR3 = '12/12/2017';
  $VAR4 = '12/12/2017';
  $VAR5 = '12/12/2017';

respectively when called by

  die Dumper(@{$state_ids});

  die Dumper(@{$warranty_dates});

despite being shown as having the following parameters:

  "state_id" => [
    1,
    1,
    1,
    1,
    1
   ],
  "warranty_date" => [
    "12/12/2017",
    "12/12/2017",
    "12/12/2017",
    "12/12/2017",
    "12/12/2017"
dipl0
  • 1,017
  • 2
  • 13
  • 36
  • How did you get the last output? This looks like you have a typo, or there is some invisible character in the `state_id`param. Maybe a `\0`? – simbabque May 31 '17 at 14:47

1 Answers1

0

So I've found the answer, which is that I didn't address the parameters as post requests.

https://corky.net/dotan/programming/mojolicious-request-parameters-example.html

quick explanation of why some of these parameters need to be in the format

$self->req->every_param('');

Passing arguments to redirect_to in mojolicious and using them in the target controller

Petter Friberg
  • 21,252
  • 9
  • 60
  • 109
dipl0
  • 1,017
  • 2
  • 13
  • 36