Show message and Load action only when showing section

11 views
Skip to first unread message

Javier Echaniz

unread,
Oct 18, 2022, 5:07:24 AM10/18/22
to Orbeon Forms
Hi, I'm trying to show a message and execute an action only when a section of the form is shown.

I've seen the event fr-section-shown, but i don't get with the key to be able to show the message only when a section fo the form is shown.

Thanks

Alessandro Vernet

unread,
Oct 18, 2022, 12:22:49 PM10/18/22
to orb...@googlegroups.com
Hi Javier,

Could you create an example on demo.orbeon.com with the code you've written so far?

-Alex

--
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 orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/d9b02e43-e9e8-4d18-b3eb-f64a00e420f4n%40googlegroups.com.

Echaniz

unread,
Oct 18, 2022, 1:29:50 PM10/18/22
to orb...@googlegroups.com

You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/uLeMLYjjQHw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CANrzKkmL8k6BUkqx_UHtjJfOKz6L-m2_h8toqfOBPr0C4yRPig%40mail.gmail.com.

Echaniz

unread,
Oct 18, 2022, 1:37:21 PM10/18/22
to orb...@googlegroups.com
I've forgotten to say that i'm using the 2018 version.

Alessandro Vernet

unread,
Oct 19, 2022, 7:15:48 PM10/19/22
to Orbeon Forms
Hi Javier,

So you'd like to execute an action when a given section of the form is shown, leveraging the `fr-section-shown` event. You could do this in plain XForms, by adding the following, say right inside the `<xf:model>`, at towards the top of the source:

    <xf:action observer="fr-view-component" event="fr-section-shown">
        <xf:message value="'fr-section-shown'"/>
    </xf:action>

If you're using Orbeon Forms CE, I'd recommend you write plain XForms, instead of relying on the markup produced by Orbeon Forms PE for actions/services, which may or may not be supported by future versions of Orbeon Forms CE. This is also true for the action syntax: if I were you, I'd be more comfortable just writing XForms for that.

You'll let me know if this works for you,

-Alex

Echaniz

unread,
Oct 20, 2022, 7:53:35 AM10/20/22
to orb...@googlegroups.com
Perfect, it works.

Lot of thanks

Alessandro Vernet

unread,
Oct 20, 2022, 4:21:52 PM10/20/22
to orb...@googlegroups.com
Excellent Javier, and thanks for the confirmation. And soon enough, you'll be mastering all the ins and outs of XForms!

-Alex

Reply all
Reply to author
Forward
0 new messages