{ "controllo": function() { var arr_est = new Array(); arr_est[0] = '.jpg$'; arr_est[1] = '.jpeg$'; arr_est[2] = '.gif$'; arr_est[3] = '.tif$'; arr_est[4] = '.tiff$'; arr_est[5] = '.xls$'; arr_est[6] = '.xlsx$'; arr_est[7] = '.doc$'; arr_est[8] = '.docx$'; arr_est[9] = '.pdf$'; arr_est[10] = '.png$'; if(jQuery(".chkbox input")[0]) { var chk = 0; var inputs = jQuery(".chkbox input"); for(var i = 0; i < inputs.length; i++) { if(jQuery(inputs[i]).prop( "checked" )){ chk = 1; } } if(jQuery('#branc_altro').val() != '') chk = 1; if(chk == 0) { alert('form.chk.alert'); return false; } } var mail = jQuery('#email'); var mail_conf = jQuery('#mail_conf'); if(mail.length && mail_conf.length && mail.val() != mail_conf.val()){ alert('form_pdf.mail.error'); return false; } // Per richiamare un oggetto memorizzato dal JSON usare nome_oggetto + "_save" js_formpdf_0_10_1173_save.invio_mail(); }, "selectIndex": function(name, obj) { document.getElementById('txt_' + name + '_index').value = obj.selectedIndex; }, "invio_mail": function() { var strDati = ''; document.getElementById('dati').value = strDati; if( confirm('I dati saranno usati per creare il pass per la fiera. Confermare l\'operazione?\nThe data will be used to create your entrance pass. Do you confirm?') ) { document.getElementById('frm_formpdf').submit(); } }, "check_reCaptcha": function() { grecaptcha.ready(function() { grecaptcha.execute('6LcIpncbAAAAAH9YIXuy_K-HKpfLO3P63qHv8X1e', {action: 'submit'}).then(function(token) { // Add your logic to submit to your backend server here. document.getElementById('g-recaptcha-response').value = token; loadJSON(document.getElementById('frm_formpdf').js_formpdf_0_10_1173).controllo(); }); }); } }
Modulo chiuso