newhck / 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

Problem with Checkbox & multiple options #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create form, Add Checkbox with multiple values (by example monday to sunday)
2. Select multiple, or just one option
3. Submit Form

What is the expected output? What do you see instead?
It should verify the checked items and put them back. Instead I get a
warning that the checkbox field is required.

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

Please provide any additional information below.
I checked/debugged the class and with a checkbox with multiple values, the
submit form will pass the values in the REQUEST array as an array of
values. Apparantly the class has issues parsing these array values?

Original issue reported on code.google.com by uwictpar...@gmail.com on 2 Jun 2010 at 8:32

GoogleCodeExporter commented 8 years ago
Checked deeper, apparently the class has some code for this but it doesn't seem 
to
work as expected.

Postback data for checkboxes is shown with a delay of two postbacks
1/ Submit data, by example 2 checkboxes selected
2/ retrieve form, no checkbox selected. Select 2 other than in step 1 and submit
3/ Still warning no input, 2 checkboxes from step 1 are selected, not the ones 
from
step 2
4/ submit again with other selections for the checkbox, now the checks from 
step 3
are shown

I tried using the setReferenceValues with the $_REQUEST/$_POST arrays, as well 
as
providing the postback value as a default value

Original comment by uwictpar...@gmail.com on 2 Jun 2010 at 9:31

GoogleCodeExporter commented 8 years ago
Thanks for this feedback.  It looks like you found a bug.  I was able to 
re-create this issue and believe to have 
corrected it.  To verify, we need to do one of two things.

1.  Provide me your sample code so I can test and verify that the issue has 
been resolved.
2.  You can use download and install the latest working copy from SVN and 
verify that your script is working 
properly.  Simply run svn checkout 
http://php-form-builder-class.googlecode.com/svn/trunk/ php-form-
builder-class

Original comment by ajporterfield@gmail.com on 2 Jun 2010 at 12:55

GoogleCodeExporter commented 8 years ago
Thanks for the quick update.
I'll test using SVN as soon as possible, but give me some time as I'm working 
on some
projects that need to be finished first.

Original comment by uwictpar...@gmail.com on 2 Jun 2010 at 1:39

GoogleCodeExporter commented 8 years ago
When do you plan to release the next revision of the class?

Original comment by uwictpar...@gmail.com on 2 Jun 2010 at 1:40