Form buttons add/remove at runtime

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

Form buttons add/remove at runtime

r.gadkari
To add buttons for form, config given on the site is like this

for e.g. <property as="xs:string"
name="oxf.fr.detail.buttons.yforms.contact">pdf save-final</property>

This needs to be placed in the local properties xml file. While this works
but we need the ability to change the buttons at runtime.

We have a requirement where the business user wants the ability to set which
buttons (Save-final and/or pdf) are available for which form.
The config file - local properties xml is part of the deployment and
business user cannot edit that file at runtime.

Can you please advise how it can be achieved?

Thanks
Rohan

--
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 post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1558600947492-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Form buttons add/remove at runtime

Jarosław Kowalewski
Hi Rohan,
you could define the visibility of the buttons in the properties.xml based on the value in the form.

<property as="xs:string"  name="oxf.fr.detail.button.save-final.visible.*.*">
if(exists(//show-save-final-button) and //show-save-final-button = 'false') then false() else true()
</property>

where show-save-final-button is a control name in your form. Note that with such a solution you need to add special fields to each form. 

Another approach can be to use request parameters but I've never tried it so not sure if it's supported by Orbeon.
<property as="xs:string"  name="oxf.fr.detail.button.save-final.visible.*.*">
if(xxf:get-request-parameter('show-button')) then false() else true()
</property>


BR,
Jarek

czw., 23 maj 2019 o 10:42 r.gadkari <[hidden email]> napisał(a):
To add buttons for form, config given on the site is like this

for e.g. <property as="xs:string"
name="oxf.fr.detail.buttons.yforms.contact">pdf save-final</property>

This needs to be placed in the local properties xml file. While this works
but we need the ability to change the buttons at runtime.

We have a requirement where the business user wants the ability to set which
buttons (Save-final and/or pdf) are available for which form.
The config file - local properties xml is part of the deployment and
business user cannot edit that file at runtime.

Can you please advise how it can be achieved?

Thanks
Rohan

--
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 post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1558600947492-0.post%40n4.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].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAHFpwcV8U8JXQVZJLF4amNm2XSTTT-_R9Z1TywRr4berT%3DspKw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Form buttons add/remove at runtime

r.gadkari
Thanks Jarek,

This has helped to resolve the issue.

Rohan

--
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 post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1558607476275-0.post%40n4.nabble.com.