The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checkboxes - only the last checkbox is collected

another beginner question:

I have multiple fieldsets with checkboxes but I can see only the last checked value in FormTools.

<input value="red" type="checkbox" name="test" /> red
<input value="green" type="checkbox" name="test" /> green
<input value="blue" type="checkbox" name="test" /> blue

If I check all three possibilities, only "blue" appears in FT (Submissions/Vies/Edit), if I check red and green, I get green, and so on - only the last value comes through.

Field Option Group seems to be ok now...

Any suggestions?

Thank you

Did you figure this one out? If not, change your markup to this:

<input value="red" type="checkbox" name="test[]" /> red
<input value="green" type="checkbox" name="test[]" /> green
<input value="blue" type="checkbox" name="test[]" /> blue

PHP requires those square brackets at the end of the name attributes for checkboxes. They let the server know that there can be multiple values sent for that field.

Good luck! Smile

I think I love this forum.

Not a FT employee, just a FT user lending a hand. If I've been helpful, please rate.

[Image: giraffe_long_85.gif]
So much useful information. I am very glad that I joined you!
Es ist wirklich eine sehr schreckliche Situation. Ich rate Ihnen, diese Pillen  zu versuchen , da Sie mir immer geholfen haben, rate ich Ihnen, diesen Ort zu versuchen, da es mir hilft, diese Art von Problem zu lösen

Forum Jump:

Users browsing this thread: 1 Guest(s)