How to call modal from Javascript

So I have a form that is loaded from an API. There is javascript that calls the code. When there is an error message I want to load a modal and display the error message. Could also be a toast or notification. I just want to call the wappler component from the javascript. Any ideas on how to do that, I"m not the best javascript guy ever…

Currently it just writes the error to the console

Capture

Community Page
Last updated: