Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
How to get my LWC to listen to events from FormAssembly form?

I've got FormAssembly installed in my org and it's loading a form on an experience site (community). I'm trying to get my custom LWC on the site to listen to events coming from the form but nothing seems to work.

In my form script tags I'm firing a custom event:

<script>
  window.onload = function() {
  const message = 'testMessage';
  let event = new CustomEvent("formMessage", { detail: message });
  window.dispatchEvent(event);
  console.log('formMessage event fired');
};

</script>

and on my LWC I add the event listener in the connected callback function:

  connectedCallback() {
    window.addEventListener("formMessage", (event) => {
      console.log('formMessage event listener ' +event.detail)
    });
  }

Now I know the forms are embedded in an iFrame but I'm pretty sure I can listen to events coming from there. I've also made sure that the event is firing and that the listener is registered on my LWC before the form fires the event but I still get nothing on the other end.

Any idea what I'm missing?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda