Closed GoogleCodeExporter closed 9 years ago
Sven,
I have made some changes in the svn working copy that I believe have corrected
this issue. Please test and let me know. You can get the latest svn working
copy by running...
svn export http://php-form-builder-class.googlecode.com/svn/trunk/
php-form-builder-class
Original comment by ajporterfield@gmail.com
on 2 Jul 2010 at 2:17
Original comment by ajporterfield@gmail.com
on 2 Jul 2010 at 2:19
It is not working like i would think:
I made an array like this
$array[0] = "one";
$array[1] = "two";
$array[2] = "three";
then i add the select and select the item "two" as default.
$form->addSelect("Select Box:", "field14", "1", $array);
I would also expect the value to be the key of the array and the text showed to
be the value of it.
Original comment by sven.lar...@gmail.com
on 2 Jul 2010 at 2:51
Sven,
The array you have provided above is a single dimensional array; therefore, you
would need to pass "two" as the default value. If you are passing in a
two-dimensional array for the options, then you would pass the specific array
key for the default value. Does this make sense?
- Andrew
Original comment by ajporterfield@gmail.com
on 2 Jul 2010 at 3:02
The latest commit, r266, further improves how values of "" and 0 are handled in
checkbox, radio, select, and checksort elements.
Original comment by ajporterfield@gmail.com
on 2 Jul 2010 at 7:40
Original comment by ajporterfield@gmail.com
on 9 Jul 2010 at 8:03
Original issue reported on code.google.com by
sven.lar...@gmail.com
on 2 Jul 2010 at 10:31