URL del iframe: http://localhost:3000/form/es
URL del iframe: http://localhost:3000/form/en
<!-- Formulario en Español --> <iframe src="http://localhost:3000/form/es" width="400" height="600" frameborder="0" title="Formulario de contacto"> </iframe> <!-- Formulario en Inglés --> <iframe src="http://localhost:3000/form/en" width="400" height="600" frameborder="0" title="Contact form"> </iframe>
// Escuchar cuando se envía el formulario
window.addEventListener('message', function(event) {
if (event.data.type === 'FORM_SUBMIT_SUCCESS') {
console.log('Formulario enviado:', event.data.payload);
// Aquí puedes agregar tu lógica personalizada
// Por ejemplo: mostrar un mensaje, redirigir, etc.
}
});