Hi I am workint to populate radio buttons, but I don’t get it. I am making an ajax call, thats fine, I get the answer from PHP, thats fine, but I can’t populate the radio buttons with the values that come from PHP. Is there any guide? Here is the code that I am using
success: function(salida){ var original = salida.trim(); var cadena = original.substr(0,original.length-2); var data = cadena.split(‘,’); var largo = data.length; if (salida.trim() === ‘nada0’){
}else{
for(var i = 0; i < largo; i++) { var numero = i+1; var opcion = radioGroup+’_’+numero; var item = data[i].split(‘-‘); $(opcion[name=item[0]][value=item[1]]);
} } }
radioGroup = var radioGroup = ‘.quform-field-43_12’;