Buy Now
Sign in

Access form data with custom php code

Joao Serina , January 31 at 12:52
Answered
J
Joao Serina

I have a multipage form and I would like to add some custom PHP validation when moving to the next page on some of the fields.

I have placed a debugger at the start of the second page so that I can see the information I'm getting followed by the php code but, when I try to access $form->data['input-name'] I get a PHP error: "Notice: Undefined variable: form in (...)".

S
stami

In chronoforms v6 you have to use: $this->data('inputname');​

GreyHead

Hi Joao,

Please see page 34 in the manual.

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
J
Joao Serina

This is going to sound strange but I had done that and it wasn't working for some reason but now it is!

Thank you very much for the quick reply Bob!