Elgg...and form checkboxes? Multiple checked items?

Does anyone know how to get multiple checked values for the same input name to be passed into an ACTION?

Eg. assume the code below is inside a FOR LOOP and creates a form with 4 rows, each having a "checkbox" column that has a value equal to the Elgg entity GUID.

<input type='checkbox' name='delete' value=$guid/>

Now when I get into the ACTION, and I checked off multiple checkboxes, I do:

$delete = get_input("delete");

But $delete is only a STRING containing the value of the LAST checkbox, not an ARRAY containing ALL values.

Any ideas?

PS.  I couldn't get the elgg_view("input/checkboxes") to work at all so I'm trying to do it manually.

  • I'm retarded...

    I forgot to indicate in the input that it was an ARRAY, ie. "[]".

    <input type='checkbox' name='delete'[] value=$guid/>