Please contact us
label {
display: block;
font-weight: 500;
margin-bottom: 4px;
font-family: questrial, Helvetica, Arial, sans-serif;
}
input,
select,
textarea {
width: 100%;
font-family: questrial, Helvetica, Arial, sans-serif;
border-radius: 4px;
background-clip: padding-box;
padding: 10px 15px;
border: 1px solid #ccc;
margin-bottom: 16px;
display: inline-block;
height: 40px;
font-size: 16px;
font-weight: 400;
line-height: 22px;
color: #33475b;
background-color: #f5f8fa;
border: 1px solid #959494;
box-sizing: border-box;
}
textarea {
height: auto;
}
.form-row {
display: flex;
gap: 10px;
margin-bottom: 16px;
}
.form-row .form-group {
flex: 1;
}
.form-row .form-group.full-width {
flex: 0 0 100%;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
margin: auto;
max-width: 100%;
}
button:hover {
background-color: #356211;
}
.phone-container {
display: flex;
align-items: center;
gap: 10px;
}
.phone-container select {
flex: 0 0 30%;
}
.phone-container input {
flex: 1;
text-align: left;
}
.error,
.success {
color: red;
margin-bottom: 16px;
font-family: questrial, Helvetica, Arial, sans-serif;
}
.error {
color: #e51520;
}
.success {
color: #4CAF50;
}
.required {
color: #e51520;
}
button {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
margin: 0;
cursor: pointer;
display: inline-block;
font-weight: 700;
line-height: 12px;
position: relative;
text-align: center;
background-color: #59942a;
border: 1px solid #59942a;
color: #fff;
border-radius: 3px;
font-size: 18px;
padding: 24px;
width: 100%;
padding: 10px;
}
.message {
padding: 10px;
border-radius: 5px;
margin-bottom: 20px;
display: none;
}
.message.error {
background-color: #fdd;
border: 1px solid #f99;
}
.message.success {
background-color: #dfd;
border: 1px solid #9f9;
}
button:disabled {
background-color: #ccc;
/* Color de fondo más claro */
color: #666;
/* Color del texto más claro */
cursor: not-allowed;
/* Cambia el cursor */
opacity: 0.7;
/* Reduce la opacidad */
}
.consentimiento {
font-size: 14px;
}
input[type="checkbox"] {
height: auto;
margin: 0;
display: inline-block;
margin-right: 5px;
width: 15px !important;
}
/* NUEVAS REGLAS ANTI-SPAM */
/* 1. Ocultar el formulario por defecto y mostrarlo solo con JavaScript */
.container {
display: none;
}
.js-enabled .container {
display: block;
/* antes: flex */
}
/* 2. Mensaje para usuarios sin JavaScript */
.no-js-message {
text-align: center;
padding: 30px;
background: #f8f9fa;
border-radius: 10px;
color: #666;
font-family: questrial, Helvetica, Arial, sans-serif;
max-width: 600px;
margin: 50px auto;
}
.js-enabled .no-js-message {
display: none;
}
/* 3. Campo honeypot (invisible para usuarios reales) */
.honeypot {
position: absolute;
left: -9999px;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}
$(document).ready(function () {
// ========== MEDIDAS ANTI-SPAM ==========
// 1. Marcar que JavaScript está habilitado
document.body.classList.add('js-enabled');
$('#js_enabled').val('true');
const $cf_1306CodeSelect = $('#cf_1306Code');
const $mobileInput = $('#mobile');
const $fullPhoneNumberInput = $('#fullPhoneNumber');
const $phoneError = $('#phoneError');
const $formErrors = $('#formErrors');
const $formSuccess = $('#formSuccess');
const $form = $('#__vtigerWebForm');
const $ip = $('#cf_1411');
const $referidor = $('#cf_1413');
const $submitButton = $form.find('button[type="submit"]');
const $consentimientoCheckbox = $('#consentimiento');
const document_referidor = document.referrer;
$referidor.val(document_referidor);
$form.attr('action', 'https://crm.mijaltech.com/modules/Webforms/capture.php');
$('#__vtigerWebForm input[name="publicid"]').val('b1f5cfa36f732deae6583d147ba6d50f');
// Estado del CAPTCHA y callbacks globales
let captchaAuthorized = false;
window.enableSubmitBtn = function () {
captchaAuthorized = true;
$formErrors.hide();
};
window.onCaptchaExpired = function () {
captchaAuthorized = false;
$formErrors
.html("El CAPTCHA ha expirado. Por favor, vuelve a completarlo.")
.show();
$formSuccess.hide();
};
window.onCaptchaError = function () {
captchaAuthorized = false;
$formErrors
.html("No se pudo verificar el CAPTCHA. Intente nuevamente.")
.show();
$formSuccess.hide();
};
function updatePhoneNumber() {
const code = $cf_1306CodeSelect.val();
const number = $mobileInput.val().replace(/^\+\d+/, '');
$fullPhoneNumberInput.val(code + number);
}
function validatePhoneNumber() {
const number = $mobileInput.val();
const pattern = /^\d{10,15}$/;
if (number && !pattern.test(number)) {
$phoneError.show();
} else {
$phoneError.hide();
}
}
function validateRequiredFields() {
const errors = [];
$('[required]').each(function () {
if (!$.trim($(this).val())) {
errors.push(`${$(this).prev('label').text().trim()} es obligatorio.`);
}
});
return errors;
}
async function obtenerIP() {
try {
const respuesta = await fetch('https://api.ipify.org?format=json');
const datos = await respuesta.json();
const ip = datos.ip;
$ip.val(ip);
} catch (error) {
console.error('Error al obtener la IP:', error);
}
}
obtenerIP();
$cf_1306CodeSelect.on('change', updatePhoneNumber);
$mobileInput.on('input', function () {
updatePhoneNumber();
validatePhoneNumber();
});
function validateConsentimiento() {
if (!$consentimientoCheckbox.is(':checked')) {
return 'Debe aceptar el Aviso de Privacidad y condiciones.';
}
return '';
}
// ========== VALIDACIONES ANTI-SPAM ==========
function validateAntiSpam() {
const errors = [];
// 1. Verificar honeypot
const honeypot = $('input[name="website"]').val();
if (honeypot && honeypot.trim() !== '') {
errors.push('Detección de bot automático.');
return errors;
}
// 2. Verificar que JavaScript esté habilitado
if ($('#js_enabled').val() !== 'true') {
errors.push('JavaScript es requerido para enviar este formulario.');
}
return errors;
}
// Spinner/estado de carga en el botón de envío
function setLoading(isLoading) {
if (isLoading) {
if (!$submitButton.data("original-html")) {
$submitButton.data("original-html", $submitButton.html());
}
const spinnerSvg =
'';
$submitButton
.html(spinnerSvg + "Enviando datos...")
.prop("disabled", true);
} else {
const original = $submitButton.data("original-html");
if (original) {
$submitButton.html(original);
} else {
$submitButton.text("Enviar");
}
$submitButton.prop("disabled", false);
}
}
$form.on('submit', function (e) {
e.preventDefault();
updatePhoneNumber();
const errors = validateRequiredFields();
const consentimientoError = validateConsentimiento();
// Validaciones anti-spam
const antiSpamErrors = validateAntiSpam();
if (antiSpamErrors.length > 0) {
$formErrors.html(antiSpamErrors.join('
')).show(); $formSuccess.hide(); return; } // Validación de reCAPTCHA antes de enviar const captchaResponse = typeof grecaptcha !== "undefined" ? grecaptcha.getResponse() : ""; if (!captchaResponse) { $formErrors .html("Por favor, completa el CAPTCHA para continuar.") .show(); $formSuccess.hide(); captchaAuthorized = false; return; } if (errors.length > 0 || $phoneError.is(':visible') || consentimientoError) { let errorMessage = errors.join('
'); if ($phoneError.is(':visible')) { errorMessage += '
' + $phoneError.text(); } if (consentimientoError) { errorMessage += '
' + consentimientoError; } $formErrors.html(errorMessage).show(); $formSuccess.hide(); } else { $formErrors.hide(); setLoading(true); $submitButton.prop('disabled', true); $.ajax({ type: 'POST', url: $form.attr('action'), data: $form.serialize(), success: function () { $formSuccess.html('Formulario enviado con éxito.').show(); if (typeof grecaptcha !== "undefined") { grecaptcha.reset(); } $form[0].reset(); // Reset the form captchaAuthorized = false; }, error: function () { $formSuccess.html('Formulario enviado con éxito.').show(); $form[0].reset(); }, complete: function () { $submitButton.prop('disabled', false); setLoading(false); $form[0].reset(); } }); } }); });
JavaScript Requerido
Para completar el registro, es necesario habilitar JavaScript en su navegador.
Esto nos ayuda a proteger el formulario contra spam automatizado.
¿Cómo habilitar JavaScript?
- Chrome/Edge: Configuración > Privacidad y seguridad > Configuración del sitio > JavaScript
- Firefox: about:config > javascript.enabled (establecer en true)
- Safari: Preferencias > Seguridad > Habilitar JavaScript
Afganistán (+93)
Albania (+355)
Argelia (+213)
Andorra (+376)
Angola (+244)
Antigua y Barbuda (+1)
Argentina (+54)
Wallis y Futuna (+681)
Austria (+43)
Australia (+61)
Bélgica (+32)
Burkina Faso (+226)
Burundi (+257)
Camboya (+855)
Camerún (+237)
Canadá (+1)
Cabo Verde (+238)
Islas Caimán (+1)
República Centroafricana (+236)
Chile (+56)
China (+86)
Colombia (+57)
Costa Rica (+506)
Croacia (+385)
Cuba (+53)
Chipre (+357)
República Checa (+420)
Dinamarca (+45)
Yibuti (+253)
Dominica (+1)
Egipto (+209)
El Salvador (+503)
Guinea Ecuatorial (+240)
Eritrea (+291)
España (+34)
Israel (+972)
Italia (+39)
Costa de Marfil (+225)
Jamaica (+1)
Japón (+81)
Jordania (+962)
Kazajistán (+7)
Kenia (+254)
Kirguistán (+996)
Corea del Norte (+850)
Corea del Sur (+82)
Kuwait (+965)
Letonia (+371)
Líbano (+961)
Lesoto (+266)
Liberia (+231)
Libia (+218)
Liechtenstein (+423)
Lituania (+370)
Luxemburgo (+352)
Macao (+853)
Macedonia del Norte (+389)
Madagascar (+261)
Malasia (+965)
Maldivas (+960)
Malí (+223)
Malta (+356)
Islas Marshall (+692)
Martinica (+596)
Mauritania (+222)
Mauricio (+230)
Mayotte (+262)
México (+52)
Micronesia (+691)
Moldova (+373)
Mónaco (+377)
Mongolia (+976)
Montenegro (+382)
Montserrat (+1664)
Marruecos (+212)
Mozambique (+258)
Birmania (+95)
Namibia (+264)
Nauru (+674)
Nepal (+977)
Países Bajos (+31)
Nueva Caledonia (+687)
Nueva Zelanda (+64)
Nicaragua (+505)
Níger (+227)
Nigeria (+234)
Niue (+683)
Norcorea (+850)
Islas Marianas del Norte (+1670)
Noruega (+47)
Omán (+968)
Pakistán (+92)
Palaos (+680)
Panamá (+507)
Papúa Nueva Guinea (+675)
Paraguay (+595)
Perú (+51)
Filipinas (+63)
Polonia (+48)
Portugal (+351)
Puerto Rico (+1)
Catar (+974)
Reunión (+262)
Rumanía (+40)
Rusia (+7)
Ruanda (+250)
Samoa (+685)
San Marino (+378)
Santo Tomé y Príncipe (+239)
Arabia Saudita (+966)
Senegal (+221)
Serbia (+381)
Seychelles (+248)
Sierra Leona (+232)
Singapur (+65)
Eslovaquia (+421)
Eslovenia (+386)
Islas Salomón (+677)
Somalia (+252)
Sudáfrica (+27)
España (+34)
Sri Lanka (+94)
Sudán (+249)
Surinam (+597)
Suazilandia (+268)
Suecia (+46)
Suiza (+41)
Siria (+963)
Taiwán (+886)
Tayikistán (+992)
Tanzania (+255)
Tailandia (+66)
Timor Oriental (+670)
Togo (+228)
Tokelau (+690)
Tonga (+676)
Trinidad y Tobago (+1)
Túnez (+216)
Turquía (+90)
Turkmenistán (+993)
Islas Turcas y Caicos (+1)
Tuvalu (+688)
Uganda (+256)
Ucrania (+380)
Emiratos Árabes Unidos (+971)
Reino Unido (+44)
Estados Unidos (+1)
Uruguay (+598)
Uzbekistán (+998)
Vanuatu (+678)
Vaticano (+39)
Venezuela (+58)
Vietnam (+84)
Wallis y Futuna (+681)
Yemen (+967)
Zambia (+260)
Zimbabue (+263)
El número de teléfono debe tener entre
10 y 15 dígitos.
He leído y acepto el
Aviso de Privacidad
y
condiciones
de Jaltech
')).show(); $formSuccess.hide(); return; } // Validación de reCAPTCHA antes de enviar const captchaResponse = typeof grecaptcha !== "undefined" ? grecaptcha.getResponse() : ""; if (!captchaResponse) { $formErrors .html("Por favor, completa el CAPTCHA para continuar.") .show(); $formSuccess.hide(); captchaAuthorized = false; return; } if (errors.length > 0 || $phoneError.is(':visible') || consentimientoError) { let errorMessage = errors.join('
'); if ($phoneError.is(':visible')) { errorMessage += '
' + $phoneError.text(); } if (consentimientoError) { errorMessage += '
' + consentimientoError; } $formErrors.html(errorMessage).show(); $formSuccess.hide(); } else { $formErrors.hide(); setLoading(true); $submitButton.prop('disabled', true); $.ajax({ type: 'POST', url: $form.attr('action'), data: $form.serialize(), success: function () { $formSuccess.html('Formulario enviado con éxito.').show(); if (typeof grecaptcha !== "undefined") { grecaptcha.reset(); } $form[0].reset(); // Reset the form captchaAuthorized = false; }, error: function () { $formSuccess.html('Formulario enviado con éxito.').show(); $form[0].reset(); }, complete: function () { $submitButton.prop('disabled', false); setLoading(false); $form[0].reset(); } }); } }); });