I have a problem with Uncaught TypeError: Can not read property and I'm going crazy I need your help I have this error:
Uncaught TypeError: Can not read property 'text' of undefined at recordQuote (script.js: 1245) at HTMLButtonElement.onclick ((index): 1)
This is the html is a simple button that when filling the fields should generate
<button onclick="grabarCita()">Grabar Cita</button>
function grabarCita(){
var inputidExtranj,paterno,materno,nombres,datepickerfn,textoNacionalidad,datepicker,tipoCanje,sede,textoTipoCanje,horaCitaNormal,pagoVoucherBN,pagoVoucherCajBN,pagoVoucherFechBN,codCalidadMigra;
//document.getElementById("idextranjero").value = <php echo $wpdb->insert_id;>;
//---------------cbx_sede
inputidExtranj = $( "#inputidExtranj" ).val();
paterno = $( "#paterno" ).val();
materno = $( "#materno" ).val();
nombres = $( "#nombres" ).val();
datepickerfn = $( "#datepickerfn" ).val();
textoNacionalidad = $( "#textoNacionalidad" ).val();
datepicker = $( "#datepicker" ).val();
tipoCanje = $( "#cbx_tipoCanje" ).val();
sede = $( "#cbx_sede" ).val();
codCalidadMigra = $( "#codCalidadMigra" ).val();
please help I'm already deleting the code