heggsta

i expected $data passed to the Validator would be the same $data passed to the form processor, but it ain't (I reckon it should be, but... there ya go) 🙂

heggsta

hmmm... easy solution seems to be, don't validate inside a Validator, do it using $data passed to the form submission processing method

heggsta

yeah, when Form::loadDataFrom() is run, $data['SkillPoints'] is an array, as I would expect, but then things get mangled somewhere, and the validator has something different passed to it

heggsta

hmmm... i thought about that, but logically i would expect/hope for something like:

  1. SkillPoints[0] = ['criteria' => 'Thing', 'points' => '20'];
  2. SkillPoints[1] = ['criteria' => 'Anothing thing', 'points' => '5'];
heggsta

I've tried adding the first group of two dropdowns using the [0] field names above, but the $data param in my validator's php() method has them as separate keys - SkillPoints[0][criteria] and SkillPoints[0][points]

heggsta

Hi all, is it possible to create a multi-dimensional array front-end form field?... I'm trying to create a sort of "grouped" field with two dropdowns, with the naming format SkillPoints[0][criteria] and SkillPoints[0][points] for the dropdowns... the idea will be that users can add (using JS) more field groups - SkillPoints[1][criteria] + SkillPoints[1][points] and so on...

heggsta

thanks @nightjarnz - got the actual error from the log file

👍 (1)
heggsta

Hello all, I'm getting a 500 error when submitting a form on a page that is in draft mode.... the error is shown on the URL <page_url>/Form?stage=Stage ... the page's parent is also in draft mode... any idea how to prevent the error?