Hulfy
2009-04-03 11:45:08 UTC
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 [b]Element ROOMS is undefined in FORM. [/b]
How do I create and access an array of checkboxes in CF?
<label> Type of Room </label>
<h3> DOUBLE </h3> <input name="rooms[]" id="double"
type="checkbox" value="double" />
<h3> TWIN </h3><input name="rooms[]" type="checkbox"
value="twin" />
<h3> TRIPLE </h3><input name="rooms[]" type="checkbox"
value="triple" />
<h3> FAMILY</h3> <input name="rooms[]" type="checkbox"
value="family" />
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 [b]Element ROOMS is undefined in FORM. [/b]
How do I create and access an array of checkboxes in CF?
<label> Type of Room </label>
<h3> DOUBLE </h3> <input name="rooms[]" id="double"
type="checkbox" value="double" />
<h3> TWIN </h3><input name="rooms[]" type="checkbox"
value="twin" />
<h3> TRIPLE </h3><input name="rooms[]" type="checkbox"
value="triple" />
<h3> FAMILY</h3> <input name="rooms[]" type="checkbox"
value="family" />