[FX.php List] Checkbox

Rob H. Christensen robhelleshoj at tiscali.dk
Wed Apr 5 12:07:04 MDT 2006



Derrick, 


> The foreach() loop operating on the value list is working correctly,
> right? You get one checkbox for each value in the value list?
Yes, you are right. I get the value lists contents with each its checkbox on
the page exactly as I want it.
What I do not get is the possibility to show which values are ticked off, if
there is more the one box checked.
> 
> I've never seen the selected/checked value placed in quotes before;
> what happens if you do the selected output without being in quotes
> (but make sure there's a space after the closing quote for the value
> parameter)?

That was just an experiment. It does not seem to make a difference.

> Also, I would drop the third argument from the in_array() function;
> it only serves to make the comparison a strict "type-alike" match.
> Remember, too, that everything is case sensitive, although the code
> looks like it should be comparing like-cased values.
That also was an experiment. But I do match strings, which either are alike
character for character or not alike. Each value is a combination of letters
and numbers
> 
> The only other thing I can think of is the difference in the way the
> value list and the actual values are formatted. The value list has
> different separators than the actual field with the checked values, I
> think.
The valuelist can be changed into an array with split, using "," as
separator. I am not sure how it is formatted in XML or how FX parses this.
I need to dig more into this.

 >The field with checked values should have each value separated
> by a return (\r), while the value list itself is an actual array, not
> a single field with some arbitrary separation character.
> 
> OK, my brain is empty now.
That's a problem well known to me too. Late evenings coding seem to produce
lots of empty space...

Rob




More information about the FX.php_List mailing list