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.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Kane@kane
Kane - 0 likes
You must log in to post replies.I'm retarded...
I forgot to indicate in the input that it was an ARRAY, ie. "[]".
<input type='checkbox' name='delete'[] value=$guid/>