bind nodeset not working for input

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

bind nodeset not working for input

kanchan
Hi All,

I am new to xforms.

I have one select1 where items are
Simple - Value = 1
Range - Value = 2
Detail - Value = 3

There are input controls for each item.
For simple - there is one textbox
For Range - there are two textboxes high and low
For detailed - there are 5 textboxes

So, I want, if "simple" is selected disable other textboxes. and if no input is provided for simple add alert in error. Here is I am binding

<xforms:bind nodeset="instance('my-instance')/My-details/Prices/PriceDetails/Common-price/Price/Value"
required="instance('my-instance')/My-details/Prices/PriceDetails/@type eq '1'" constraint="string-length(.)>=1"/>

But this is not helping. When I click on submit, I am getting alert for inputing value for simple price. I want, if option simple is clicked and not inputted in simple price value then it should display error message.

Your help will be highly appreciated.
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: bind nodeset not working for input

kanchan
Any Help please.
Reply | Threaded
Open this post in threaded view
|

Re: bind nodeset not working for input

Alessandro  Vernet
Administrator
In reply to this post by kanchan
Hi,

Are you using Form Builder, or writing XForms by hand? In the <xf:bind> you quoted, I see a relevant="…", but I would expect you to have a number of those <xf:bind> that use relevant="…" to hide/show the different text fields depending on the selected value.

Does this help? If you're still stuck, I'd recommend you create a bare-bone stand-alone example that just has the aspect you explained, and post it here, so we will help us point you to what is missing or would need to be changed.

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