Forum Moderators: mack
I've got the Form tutorial from WW open and I'm picking through it. I have a couple of questions though- things don't seem to be working correctly.
a. When I use ID instead of name as the <input> attribute- I get nothing back from my form results...name works fine.
b. When I set-up checkboxes- should the boxes that aren't checked appear labeled 'off' in the results? I only get 'on'. If it is not checked there is a blank space in the results.
c. When using radio buttons- should the control name be something like- name="level" or name="level[]"? When using the latter and submitting it to a PHP script it of course will produce 'array'-> Any clarification on this or any of these is appreciated.
Thanks in advance.
a-As a general rule its best to use name and id on an input.
b-No, only the checked boxes give you a value. you can get a list if you give them all the same name - on,,on,,on,,,,,,,etc
and then use a split function -
ArrayOfCheckboxes = split(request("myCheckBoxes"),",")
c-if you want them grouped ( so only one can be on) give them identical names, different values
hope it helps
aspdaddy