I try that the user is "forced" to give his name to be able to access the content, I want it not to close when clicking outside the box (I'm new to this)
window.onload = function (){(Swal
.fire({
title: "Tu nombre",
input: "text",
confirmButtonText: "Continuar",
})
.then(resultado => {
if (resultado.value) {
let nombre = resultado.value;
swal.fire("Hola " + nombre + "tu sinceridad es de mucha ayuda. ");
}
}))}
the solution is to add:"allowOutsideClick: false," in the properties of your swal message. It would be solved like this: