Hi
I got a little problem with a multipage form (1st page form, 2nd page preview with manipulation, 3rd page submit).
As example I got in my form 2 fields:
on the 2nd page I calculate the age and save it again to the form values in custom code (controller):
If I show the values with the debugger on this page (2nd page), I see the correctly calculated age in form array.
Now I submit the page and want to save the values in DB/Email and PDF.
In all 3 events, the {age} is again empty.
Any ideas how I have to manipulate the data on the 2nd page, so they stay saved in the on submit page?
Thanks Pawel
I got a little problem with a multipage form (1st page form, 2nd page preview with manipulation, 3rd page submit).
As example I got in my form 2 fields:
<input type="text" name="birthday">
<input type="hidden" name="age">
on the 2nd page I calculate the age and save it again to the form values in custom code (controller):
$timeZone = 'Europe/Zurich'; // +2 hours
date_default_timezone_set($timeZone);
...
$foo_age = date_diff($form->data['birthday'], $calcDate);
$form->data['age'] = $foo_age->y;
If I show the values with the debugger on this page (2nd page), I see the correctly calculated age in form array.
Now I submit the page and want to save the values in DB/Email and PDF.
In all 3 events, the {age} is again empty.
Any ideas how I have to manipulate the data on the 2nd page, so they stay saved in the on submit page?
Thanks Pawel
Hi Pawel,
Do you have a hidden field named "age" in the 2nd page ? if yes then can you test with a debugger in the 3rd page?
Also please add a "value" attribute for the fields code!
Regards,
Max
Do you have a hidden field named "age" in the 2nd page ? if yes then can you test with a debugger in the 3rd page?
Also please add a "value" attribute for the fields code!
Regards,
Max
This topic is locked and no more replies can be posted.