How to listen to Form Block events and add Custom Code (React version)

There are problems with your code, not really a problem of selector.

Few things:
It’s or failure or success but not just submit-form (which is triggerred whether it’s a success or a failure => it will lead to conflicts)

Can you explain me exactly what you want to do, step by step with this script and by naming the elements.
Like “when there is form submission (form name) in this page… I want this to happen…”

I will try to do it tomorrow, if I have time.

PS: I’m not a Softr employee

@matthieu_chateau @artur ok I want to show a loading screen immediately after a user submits a form(named metricform) in a modal(named “ad-filter-modal”), hide the screen and reload the page that brought up the modal(poping the modal off) when the form returns success,
and hiding the screen when the foem submission fails
so I have automation in make/integromat with a response webhook that fires on completion of the automation, this emits the “submit-form-success” event which is supposed to hide the loading screen and reload the parent window. so that’s why I listen to the “submit-form” and “submit-form-success” events. I hope this gives you clarity on my use case

Ok, so the submit form success event listener is not supposed to be trigerred on completion of the automation, it is trigerred on form submission stricto sensu (so => before the automation is completed or, in other words, whatever if the make automation is a success or a fail).

Does this Make automation, when it is successful, change something in the page, visually? A field in a table or in a list or something?

Hi @artur I think this ‘submit-form-formName’ event is broken. It doesn’t emit just before the form is submitted, as expected

Something that can help you: Display a waiting screen for the exact duration of a long automation / Make scenario with ChatGPT or else

(Artur won’t answer most of the time in the community, a lot ongoing on the engineering side)

@matthieu_chateau or @artur, is there an event for a Call API success yet? I am needing to listen to a List Block for a successful Call API event and could not find the event name to listen for. Thank you.

Coming soon I guess (tomorrow or after tomorrow)

Hi Joshua,

events for API calls:

call-api-success-blockId
call-api-failure-blockId

They should be live (to be tested)

I’m a complete novice, but these didn’t work for me - I was just testing a basic page refresh. I did a test with another event listener (record update) and it did work.