J'ai une forme dynamique, je dois bulid un tableau de poste à champ avec un certain ID.request.POST pylons, obtenant tableau comme dans php
Par exemple:
<input type="checkbox" name="field[124][]" value="1">
<input type="checkbox" name="field[124][]" value="2">
En php je peux simplement obtenir la valeur et la clé.
foreach($_POST as $key => $value){
if(is_array($value){
foreach($value as $key2 => $value2){
//i get key=>124 and all values for this key
}
}
}
<input type="checkbox" name="field" value="1">
<input type="checkbox" name="field" value="2">
Dans Pylônes pour tableau de case à cocher je peux utiliser
request.POST[field].getall()
Comment puis-je créer dans Pylônes publier tableau comme en PHP?
Merci.