[thelist] Phorm and Checkboxes

Anthony Baker lists at thinkbigideas.com
Mon Jan 6 16:00:02 CST 2003


Hey all,

Thanks for all the feedback and support on this. Several of the
replies enlightened me, and others pointed me in the direction
I should go.

Anyhow, found the answer for PHORM, at least. Located a single
post that pointed to a specific plug-in that converts an array
used for a checklist (e.g., option[]) into a variety of possible
text strings.

The plug-in is FormatLib, located at:
http://www.phorm.com/plugins.php3


Works great, and problem solved.


Cheers,

Anthony




| -----Original Message-----
| From: thelist-admin at lists.evolt.org
| [mailto:thelist-admin at lists.evolt.org] On Behalf Of .jeff
| Sent: Monday, January 06, 2003 1:43 PM
| To: thelist at lists.evolt.org
| Subject: RE: [thelist] Phorm and Checkboxes
|
|
| sasha,
|
| ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
| > From: sasha
| >
| > Because they all have the same name?  $question_01 =
| > 'item 1' is being overwritten by $question_01 =
| > 'item 2'.  They should only have the same name if
| > they're radios, not checkboxes.  The basics of forms.
| ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
|
| that's not true at all.  if they all have the same name and
| item 1 and item 2 are checked then, if php/phorm is doing
| things properly, $question_01 should be 'item 1,item 2'.  the
| browser simple collects all the successful controls, combines
| same named ones (regardless of the type of control --
| select-one, select-multiple, checkbox, text, password,
| hidden, and textarea) into a comma-delimited list of values
| and sends them to the server.  some are less useful to use in
| this fashion -- text, password, and textarea -- as the user
| could potentially enter a comma in the field making it
| impossible distinguish between user-entered commas and commas
| used to delimit values for same-named elements.
| interestingly, you can even have same-named, but different
| typed controls that, if both successful, will create a
| comma-delimited list of values.
|
| from the w3.org:
|
|   "Several checkboxes in a form may share the same
|    control name. Thus, for example, checkboxes allow
|    users to select several values for the same
|    property. The INPUT element is used to create a
|    checkbox control."
|
http://www.w3.org/TR/REC-html40/interact/forms.html#checkbox

the same is definitely true for a multi-select with more than one option
selected.

the only same-named elements that can't have more than one element
successful are radio buttons because they represent a set with a
mutually exclusive choice and buttons because only one control can be
clicked by the user at a time.

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/



--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list