great script, thanks for it!
Question regarding the validators and arrays, for example:
In my form there is an input name=group[] type=checkbox.
I would like to add validation in order to control the minSelectedItems and maxSelectedItem.
How can validation be added to an input that has a name as array?
a. if I add the validator to the original code ( name=group[]:testValidator ) - the validator is not called (but the PHP works as expected..)
b. if i remove "[]" (i.e. name=group:testValidator) then the validator works. but PHP $_POST only see the last variable. it needs the [] to process the checkboxes.
Any idea how to bypass this cleanly? (without breaking your code)
thanks.
Formit doesn’t seem to be setting any placeholders for use in the redirect page (e.g. Thank You page).
It’s calling toPlaceholders() and the $fields array has the appropriate stuff in it, but nothing seems to be available on the redirect page. I can’t figure out why.
I did a print_r($modx->placeholders) on the Thank you page and none of the Formit fields are there.
Yep I tried <?php return true; ?> but it stays on the page. When I remove myTest from the &hooks it redirects properly. Possible a bug?
How about compatibility with Evo 1.0.x ?