Hello,
Updating text, area, and number fields works perfectly, but the radio button fields do not update.
In my example, the radio_button field keeps the value saved when creating the record
Is it malfunction of jqform or poor programming?
Best regards
Christian
……
array(‘id’=>’id_lab_5’, ‘style’=>’background:#E1E1E1; text-align:center; width:70px; ‘.$margin_3, ‘value’=>’Encadrement’, ‘contenteditable’=>’false’));
if ($_cooky_om[’bouton_radio_u’] == 1) { $elem_1[]=$form_formulaire->createElement(’bouton_radio’,’radio’, array(‘checked’=>’1’, ‘value’=>’1’, ‘id’=>’bouton_radio_1′, $margin_4)); }
else { $elem_1[]=$form_formulaire->createElement(’bouton_radio’,’radio’, array(‘id’=>’bouton_radio_1′, ‘value’=>’1’, $margin_4)); }
$elem_1[]=$form_formulaire->createElement(‘lab_6′,’text’, array(‘id’=>’id_lab_6’, ‘style’=>’background:#E1E1E1; text-align:center; width:70px; ‘.$margin_4, ‘value’=>’Sportif’, ‘contenteditable’=>’false’));
if ($_cooky_om[’bouton_radio_u’] == 2) { $elem_1[]=$form_formulaire->createElement(’bouton_radio’,’radio’, array(‘checked’=>’1’, ‘value’=>’2’, ‘id’=>’bouton_radio_2′, $margin_4)); }
else { $elem_1[]=$form_formulaire->createElement(’bouton_radio’,’radio’, array(‘id’=>’bouton_radio_2′, ‘value’=>’2’, $margin_4)); }
$elem_1[]=$form_formulaire->createElement(‘lab_7′,’text’, array(‘id’=>’id_lab_7’, ‘style’=>’background:#E1E1E1; text-align:center; width:70px; ‘.$margin_4, ‘value’=>’Associatif’, ‘contenteditable’=>’false’));
if ($_cooky_om[’bouton_radio_u’] == 3) { $elem_1[]=$form_formulaire->createElement(’bouton_radio’,’radio’, array(‘checked’=>’1’, ‘value’=>’3’, ‘id’=>’bouton_radio_3′, $margin_4)); }
else { $elem_1[]=$form_formulaire->createElement(’bouton_radio’,’radio’, array(‘id’=>’bouton_radio_3′, ‘value’=>’3′, $margin_4)); }
……
$_bouton_radio = $data[’bouton_radio’];
$_area_1 = $data[‘area_1’];
…….
if ($clef_1 == 0) {
try {
jqGridDB::beginTransaction($conn);
$sql=”INSERT INTO demandes (formulaire,association,statut,responsable,courriel,telephone,manifestation,datedeb,heuredeb,datefin,heurefin,area_1,bouton_radio,prix1,prix2,prix3,datecreation,datemodification,fic_1,fic_2,fic_3,fic_4)
VALUES (:formulaire,:association,:statut,:responsable,:courriel,:telephone,:manifestation,:datedeb,:heuredeb,:datefin,:heurefin,:area_1,:bouton_radio,:prix1,:prix2,:prix3,:datecreation,:datemodification,:fic_1,:fic_2,:fic_3,:fic_4)”;
$stmt_p5=$conn->prepare($sql);
$stmt_p5->execute(array(‘:formulaire’=>$_formulaire,’:association’=>$_association,’:statut’=>$_statut,’:responsable’=>$_responsable,’:courriel’=>$_courriel,’:telephone’=>$_telephone,’:manifestation’=>$_manifestation,’:datedeb’=>$_datedeb,’:heuredeb’=>$_heuredeb,’:datefin’=>$_datefin,’:heurefin’=>$_heurefin,’:area_1’=>$_area_1,’:bouton_radio’=>$_bouton_radio,’:prix1’=>$_prix1,’:prix2’=>$_prix2,’:prix3’=>$_prix3,’:datecreation’=>$_datecreation,’:datemodification’=>$_datemodification,’:fic_1’=>$fic[0],’:fic_2’=>$fic[1],’:fic_3’=>$fic[2],’:fic_4’=>$fic[2]));
jqGridDB::commit($conn); }
catch(Exception $e) { jqGridDB::rollBack($conn); echo $e->getMessage(); } }
else {
try {
$sql=”UPDATE demandes SET manifestation = ‘$_manifestation’, bouton_radio = $_bouton_radio, datedeb = ‘$_datedeb’, heuredeb = ‘$_heuredeb’, datefin = ‘$_datefin’, heurefin = ‘$_heurefin’, area_1 = ‘$_area_1’, prix1 = $_prix1, prix2 = $_prix2, prix3 = $_prix3, datemodification = ‘$_datemodification’, fic_1=’$fic[0]’, fic_2=’$fic[1]’, fic_3=’$fic[2]’, fic_4=’$fic[3]’ WHERE clef_1 = “.$clef_1;
//$resultatmessage = fwrite($fdtrace, $sql);
$stmt_fu=$conn->exec($sql); } catch(PDOException $e) { echo $e->getMessage(); }
}
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top