[pmwiki-users] WikiTrail AddDeleteLine

Martin Fick mogulguy at yahoo.com
Wed Oct 4 14:42:09 CDT 2006


--- The Editor <editor at fast.st> wrote:

> Had a question though for you Martin about how
> arrays work with radio boxes.  For ex:
> 
> (:input radio Test[] apple:)Red
> (:input radio Test[] banana:)Yellow
> (:input radio Test[] grape:)Purple

I'm not sure what markup pwmiki makes for radio
buttons, but the main idea behind radio buttons is to
not allow multi selections!

I guess each readio button is put into a group of
sorts (perhaps in your example test[]) and so each
group will only allow one selection.  If you want
multi groups, they should have separate names.

> With radio boxes, it allows multiple selection but
> seems to return
> POST[apple] = Red, etc. Not test.  At least that's
> what it looked like
> when I print-r'd $POST.  

With reference to my comments above, the group name
might be ignored when submitting, leaving only the
apple=Red?  To debug this, always go back to the html
source: look at what the wiki markup creates.  You can
also test submission easier if you make the form use
GET temporarily.  Then you can simply look at the URL
to try and understand why php is setting its vars the
way it is.  i.e. do you see something like
test[]=apple&test[]=banane or something like
apple=Red&banana=yellow?

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list