How to run custom JS after changing step (Form Runner - wizard)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to run custom JS after changing step (Form Runner - wizard)

Jacek
This post was updated on .
When I want to run JS after my form is succesfully saved, I use this code in my form source:

<xxf:script ev:event="fr-data-save-done">
    // Custom JS
</xxf:script>

Is it possible to run custom JS after I go to the next step in Form Runner?

Process would look like:
1. I click the wizard-next button;
2. next step is loading (I see the loading indicator);
3. loading indicator disappears and custom JS is running.
Reply | Threaded
Open this post in threaded view
|

Re: How to run custom JS after next step (Form Runner)

Jacek
This post was updated on .
Generally, is there is some way to run custom js when I change step in Form Runner (wizard)?
There are multiple ways to change step:
- click next/prev buttonl;
- click sectiopn title on the navigation list;
- click on the position in the error summary what moves me to the section with specific error.
Reply | Threaded
Open this post in threaded view
|

Re: How to run custom JS after next step (Form Runner)

Alessandro  Vernet
Administrator
Hi Jacek,

In XForms, you could listen to DOMActivate on the triggers id fr-wizard-prev and fr-wizard-next. Would that work for you? If you want to see the source where those triggers are, see wizard.xbl.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to run custom JS after next step (Form Runner)

Jacek
This post was updated on .
Thanks Alessadro, your hint didn't solve all problems, but it was very useful.
Reply | Threaded
Open this post in threaded view
|

Re: How to run custom JS after next step (Form Runner)

Alessandro  Vernet
Administrator
Jacek, got it, I am glad it helped, at least a bit. And of course, if
there anything we can help with, feel free to follow-up here or in
another thread.

Alex

On Mon, Jan 26, 2015 at 5:56 AM, Jacek <[hidden email]> wrote:

> Thanks Allessadro, your hint didn't solve all problems, but it was very
> useful.
>
> --
> View this message in context: http://discuss.orbeon.com/How-to-run-custom-JS-after-changing-step-Form-Runner-wizard-tp4659405p4659476.html
> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet