Visible and read-only depending on the URL parameter or HTTP header parameter

30 views
Skip to first unread message

Władysław Czaja

unread,
Jan 8, 2021, 8:44:43 AM1/8/21
to Orbeon Forms
I would like to do so, on the same form, that person A cannot see the person B section when there is an address: http://form (no parameter) 

and person B has what person A filled in read-only, but has his own section (or sections or controls) visible and to be filled (if the address is http://form?personB = 1)  

If I put in the Read-Only 

field xxf: get-request-parameter ('personB') / string () = '1' 

then I have at the address http://form?PersonB = 1 sections of personA as readable and that's ok 

but how to do so that at the address http://form?personB = 1 the fields of person B are visible and editable?

Alessandro Vernet

unread,
Jan 10, 2021, 2:18:22 AM1/10/21
to orb...@googlegroups.com
Hi Władysław,

You seem to be saying that you make the distinction between:

- Person A doesn't have a `PersonB=1` request parameter.
- Person B has a `PersonB=1` request parameter.

You can put those formulas at the level of the section. Say:

- If you want a section to be readonly for person A but not person B, in the
Section Settings, under Read-Only, use the formula:
`not(xxf:get-request-parameter('personB') = '1')`. If you want it to be
readonly for person B but not person A, do the same without the `not()`.
- If you want a section to be hidden for person A but not person B, in the
Section Settings, under Visibility, use the formula:
`not(xxf:get-request-parameter('personB') = '1')`. If you want it to be
hidden for person B but not person A, do the same without the `not()`.

Does this help, or did I miss something about your situation?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

Władysław Czaja

unread,
Jan 17, 2021, 1:34:53 PM1/17/21
to Orbeon Forms
Hi Alessandro,

This solution works. Thank you very much.

Vlad 

Alessandro Vernet

unread,
Jan 18, 2021, 7:49:23 PM1/18/21
to orb...@googlegroups.com
Perfect Vlad, and thank you for the confirmation.
Reply all
Reply to author
Forward
0 new messages