Skip to main content
Known Participant
April 3, 2009
Question

Array of Checkboxes

  • April 3, 2009
  • 2 replies
  • 569 views
Hi,

I have an old PHP script that I am converting to coldfusion, I have an array of checkboxes which in PHP was created by adding square brackets. When I try this in CF I get Element ROOMS is undefined in FORM.

How do I create and access an array of checkboxes in CF?
    This topic has been closed for replies.

    2 replies

    tclaremont
    Inspiring
    April 3, 2009
    Make sure you check for IsDefined in the event that the list is empty on the processing page, or else you will get an error.
    Inspiring
    April 3, 2009
    The simplest way to do check boxes is to give them all the same name and forget about arrays. When you submit the form, you will either have a list or nothing whatsoever.