Passing Parameter to Control Text

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

Passing Parameter to Control Text

pkondaka
Hello Folks,

I have requirement that I need to pass parameter to control text.

here is example with Radio button control

Are you married <praveen>?
Yes
No
Reply | Threaded
Open this post in threaded view
|

Re: Passing Parameter to Control Text

Alessandro  Vernet
Administrator
What do you mean by "pass a parameter? For instance, would you like to set the value of the field when the form is loaded? Is this with a form you're creating with Form Builder?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Passing Parameter to Control Text

pkondaka
Yes. from Form builder when I am creating radio button control, I want to have set external parameter to control's text.

When form loading, let say I have global or instance varibel of String say value = "England"

When I am creating Radio button control ex:

Are you ready to leave <"England"> in next one month
Yes
No

When I run the form after creating it should appear as mentioned above.

I hope this explains well. Please help me in this.

Thanks in advance.

Reply | Threaded
Open this post in threaded view
|

Re: Passing Parameter to Control Text

Alessandro  Vernet
Administrator
If you're asking about passing a parameter to a form, the simplest is most likely to use a request parameter. Then, in your form, you can use xxf:get-request-parameter('my-param') to access the value of the parameter, for instance to set the initial value of a control.

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:get-request-parameter-

It also seems that you would like to have the label of the control be dynamic, which is not supported out of the box by Form Builder. Even if not ideal, you could maybe simulates that by using an output control next to the radio box.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet