Dialog box

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

Dialog box

mbojja
Hi Alex - Can a dialog box be displayed with an error message if a control validation fails and not let the user submit the form. 

Scenario
Only payroll staff (code '111') can submit a form.
If ($code != 111) then display dialog box with the error message.

if possible, can you please point me in the right direction

Thanks

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/99b0aba8-3bd3-414a-a01c-11875b4ba9f8n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Dialog box

Alessandro  Vernet
Administrator
Hi Manish,

Is this with a form created with Form Builder? If so, isn't this happening
by default, i.e. if a field is invalid, and users try to submit or save the
form, they will get a dialog telling them they need fix errors first, and
all errors will show in the error summary.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1603320611788-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Dialog box

mbojja
Yes it does. But the requirement is to display a dialog box as soon as the validation fails

Scenario - Display error dialog box if the submitter is not a Manager.
Example: Employee details are auto-populated based on the logged in user which includes their position (positions can be multiple in which case the submitter selects one from a drop-down). If the selected submitter position code does not match with the manager code then that should immediately dispatch/trigger a dialog box with a message 'You are not eligible to submit this form' even before clicking on save or submit button. Is this possible?

Thanks

On Thursday, October 22, 2020 at 6:50:13 AM UTC+8 Alessandro Vernet wrote:
Hi Manish,

Is this with a form created with Form Builder? If so, isn't this happening
by default, i.e. if a field is invalid, and users try to submit or save the
form, they will get a dialog telling them they need fix errors first, and
all errors will show in the error summary.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1683a9ff-f6d7-45fa-a221-7695217c15b7n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Dialog box

Alessandro  Vernet
Administrator
Hi Manish,

You would have to write some XForms to do something like that. And the
XForms should go in a separate file on the server where you put your custom
model logic. You can use an `<xf:message>` action to show the message, or if
you need a custom dialog, you can also create your own custom dialog.

https://doc.orbeon.com/form-runner/advanced/custom

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1603399818910-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet