Hi Bob
I followed your instructions in the FAQ "How to sanitize my form data" for my multipage form, and I am running into some problems.
When I did a
pr($form->data)
in my custom code, only the elements from the last page showed up. I understand I need to add a "Multi Page (reset=no" action to the On Submit event, and I can assure that is done (see attachment). But for some reason the $form->data just does not have any of the elements from previous pages. As a result, the validation code returns "undefined index" when it reaches these lines:
$form->data[$v] = filter_var($form->data[$v], FILTER_SANITIZE_STRING);
$form->data[$v] = xss_clean( $form->data[$v] );
The form has no idea what $form->data[$v] means… ???!!!!
However, the ensuing debugger output clearly displays every element with its respective value, and the form was able to post the data to the table in the DB… But it can't be validated…
Please help!
SH
I followed your instructions in the FAQ "How to sanitize my form data" for my multipage form, and I am running into some problems.
When I did a
pr($form->data)
in my custom code, only the elements from the last page showed up. I understand I need to add a "Multi Page (reset=no" action to the On Submit event, and I can assure that is done (see attachment). But for some reason the $form->data just does not have any of the elements from previous pages. As a result, the validation code returns "undefined index" when it reaches these lines:
$form->data[$v] = filter_var($form->data[$v], FILTER_SANITIZE_STRING);
$form->data[$v] = xss_clean( $form->data[$v] );
The form has no idea what $form->data[$v] means… ???!!!!
However, the ensuing debugger output clearly displays every element with its respective value, and the form was able to post the data to the table in the DB… But it can't be validated…
Please help!
SH