roji430 / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

Serializing elements in the save() function fails which results in not be able to use the validate functionality #155

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a form with validation i.e. required fields
2. Submit it
3.

What is the expected output? What do you see instead?

I expect the error message when a required field is not filled in.

What version of the product are you using? On what operating system?

I use 2.2-php5, FreeBSD, PHP 5.2.9.

Please provide any additional information below.

I attached a working example which reproduces the bug.
I did some research and it seems that serializing $this in the save() function 
does not serialize the elements.
In this textfile i also copy/pasted the session info and serialized session 
info.

Original issue reported on code.google.com by webvan...@gmail.com on 8 Sep 2011 at 9:39

Attachments:

GoogleCodeExporter commented 8 years ago
For I don't know what reason, the $elements variable of the main Form class is 
"private". Set it to "protected" and you'll be fine.

Original comment by jfa...@gmail.com on 2 Oct 2012 at 11:08