Validation - Warning message - change default button

38 views
Skip to first unread message

Philippe Heiz

unread,
Feb 13, 2024, 1:18:11 PMFeb 13
to Orbeon Forms
I am using Orbeon Forms (v2019.2.2) in my company to simplify certain processes.
In one form there are mandatory fields configured to trigger an Info-warning if values are missing while the form is saved.

Here's my issue: On the warning-message that pops up (if not all mandatory fields are provided on save) the default button is "Review". I would like the default/highlighted button be "Continue".
Is that possible?

Thanks,
Phil

Alessandro Vernet

unread,
Feb 14, 2024, 2:44:05 PMFeb 14
to orb...@googlegroups.com
Hi Phil,

What does "Continue" do? Are you looking to change the button's label, or are you also seeking a different behavior?

-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/7ff4f075-e61e-47fd-8dd6-3a813ece3fean%40googlegroups.com.

Philippe Heiz

unread,
Feb 15, 2024, 1:18:13 PMFeb 15
to Orbeon Forms
Hi Alex,
"Continue" resumes the saving process, while "Review" cancels it. 
The whole problem, is that it creates confusion amongst the users. Most people tend to click on the default (highlighted) button without bothering to read the message.
So, to your question: I just would like to set the default focus on the "Continue" button

Phil

Alessandro Vernet

unread,
Feb 15, 2024, 9:42:50 PMFeb 15
to orb...@googlegroups.com
Hi Phil,

I understand. The logic you're referring to is located in `validation-dialog.xhtml`. When the dialog appears, it automatically sets the focus on the "cancel" button, which is associated with the Review function. To alter this behavior, you would need to modify this file. If you're willing to make this change, you can extract the file from `WEB-INF/lib/orbeon-form-runner.jar`, then place it in `WEB-INF/resources/config/apps/fr/includes/validation-dialog.xhtml`. You should add an `id="fr-validation-dialog-continue"` to the first `xf:trigger` and shift the focus from `fr-validation-dialog-cancel` to `fr-validation-dialog-continue`. Please let me know if this solution meets your needs.

    <xf:setfocus event="xxforms-dialog-open" control="fr-validation-dialog-cancel"/>

-Alex

Alessandro Vernet

unread,
Feb 22, 2024, 7:13:52 PMFeb 22
to orb...@googlegroups.com
Hi Phil,

Did you have a chance to try setting the focus on the button with `<xf:setfocus>`? If so, did that work for you?

-Alex
Reply all
Reply to author
Forward
0 new messages