Javascript event on microflow trigger

2
I am trying to configure a click event through Javascript / JQuery on an element (for instance a button) that also triggers a microflow through the modeler. When pressing the button however, the javascript never gets executed. I wonder if anyone else has run into this problem, and knows a way around it.
asked
3 answers
2

It is not a very clean solution, and there are probably better ways to do this, but what I have done in such a case is the following.

Style the microflow button as invisible. Add a html snippet or formatString that displays a button that calls a javaScript function. As part of this javaScript function you click on the invisible microflow button. If you give the microflow button a name in the modeller it should show up as ...-name (inspect in browser to find the actual name) as a css classname, which you can use to find the button in the DOM.

As I said, this feels like a hack and probably is, but the fact that the microflow button is still there in the modeler at least makes it kind of explicit that the microflow is triggered by a user from the specific page.

answered
2

Take a look at the Keyboard shortcut widget from the appstore

answered
1

Try using vanilla JS to attach the event to the button.

answered