mardi 19 janvier 2016

Golang - How to get all the value of checkbox? r.FormValue is not working?

This is my HTML :

<input type="checkbox" name="product_image_id" value="0" />
<input type="checkbox" name="product_image_id" value="1" />
<input type="checkbox" name="product_image_id" value="2" />

If I check all the options and I use r.FormValue("product_image_id") to get the value of checked options, I will only get the value 0.

I mean I can only get the first value, and I can't get other value although it was checked.

Please help me. Thanks.




Aucun commentaire:

Enregistrer un commentaire