[pmwiki-users] Input recipe
jo at durchholz.org
Sat Jun 25 01:34:15 CDT 2005
Patrick R. Michaud wrote:
> Fill in the question marks:
> <input type='checkbox' name='Send me newsletters' value='???' checked='1' />
> Also, I'm not sure that control names are allowed to have spaces, so this
> would probably have to be "Send_me_newsletters".
Strangely enough, the HTML 4.01 spec says that control names are CDATA,
not NAME, so you can use anything, even "character entities" like
Ä. The browser should expand it, so you'll get back an Ä... and the
browser is supposed to replace tabs and newlines with a single
Also, since the equals sign is used to delimit name and value in the
returned data, you won't get it back.
Which means that you can have nearly anything in a control name, but in
practice (and to avoid hitting browser bugs), you'd want to restrict
that to anything printable except the equals sign (and maybe you'd even
avoid character entities).
> [x] Sell my address to penis enlargement vendors (this is unchecked)
>This one is named "sell my address", and it is unchecked because of
>the lowercase x.
Like Patrick, I don't see the "sell my address" name, but I have a
different, but I see a different problem: not all fonts make it easy to
differentiate uppercase and lowercase x. [X] and [x] look almost
identical on my screen (I'm using Lucida Console 8pt, since I like to
have as much text as possible on the screen).
I'd suggest using [ ] instead of [x] for an unchecked checkbox.
>>>>[o] 12-24 [o] Out of our target demographic [*] You're too nosy (default choice)
>>Each radio button should be named after its label on the right. [*]
You mean "valued".
The form names for a group of radio buttons must be equal - that's how
the browser finds out which radio button controls belong to one group.
IOW each radio button needs two pieces of information:
* Its name (which gives the "name" part in the returned name=value pair)
* Its value (the checked radio button will fill in the "value" part of
the returned name=value pair)
(I just see that Patrick wrote the same in different words.)
More information about the pmwiki-users