I am building form where controls are conditionally visible. My need is to
remove a stored value if the user modifies the parent control and makes a control containing data no longer visible. ex. control 1 age "Is person over the age of 18" Yes = 1, No = 0; control 2 guardian visible if $age = 1 guardian "Are you the parent/guardian?" The need is that if the user first selects "No" for control age then provides data in control guardian. Next the user changes the selection of control age to "Yes" I need the value of the control guardian which is no longer visible set to '' -- 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/1581984075634-0.post%40n4.nabble.com. |
Administrator
|
Hi Seth,
Yes, this would be very useful, and we do have request for enhancement #3152 for this (see link below). I've added a +1 from you! https://github.com/orbeon/orbeon-forms/issues/3152 ‑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/1582068245901-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi, I met such a case 12 years ago and till now have to work with it. Maybe it would be nice to have any 'form builder' checkbox but you can fix it now just by using 'simple' XPath expression. just in calculated field type something like: if($myfiled = '1') then . else '' ('' single quotes means empty string/value) what will calculated as: if a field is visible (
$myfiled = '1'
) just accept what user typed, otherwise reset to empty value. And that's it :) //Jarek śr., 19 lut 2020 o 00:23 Alessandro Vernet <[hidden email]> napisał(a): Hi Seth, 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/CAHFpwcVK0Q_7k%3D7BZzH%2BB2aUcuDv%2BS9hKcqoyAhrzcmVhDNuRQ%40mail.gmail.com. |
On Tuesday, February 18, 2020 at 5:33:55 PM UTC-6, Jarek wrote:
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/e06d9f98-579a-4e9a-8791-ed69f31e3e56%40googlegroups.com. |
Administrator
|
Hi Seth, I'm not sure if you intended to add something in your previous
message, but only the quoted content of Jarek's message came back in your answer. ‑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/1582154339711-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Jarosław Kowalewski
Hi Jarek and Alessandro,
-- Thank both of you for the quick and helpful responses. I am using a multiselect option for the parent so the = option will not work unless I use a large matrix of all possible solutions containing the value(s) I need for the visibility. I used this XPath for the visibility: $MyField[contains(text(), '1')] or $MyField[contains(text(), '2')] or $MyField[contains(text(), '3')] But I am not able to use the same formula in the calculated value? I may not have the proper syntax. The second issue that is related is getting the formula to work with a dynamic dropdown. When I have a formula like: if($MyField[contains(text(), '1')]) then . else if($MyField[contains(text(), '2')]) then . else'' Then the dropdown becomes read only and the user cannot modify the dropdown. I have tried many combinations but not one that has been a legal syntax or produced the results I am aiming to achieve. Any thoughts? On Tuesday, February 18, 2020 at 5:33:55 PM UTC-6, Jarek wrote:
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/f0ac4342-ff2b-4218-adea-04748708cb2d%40googlegroups.com. |
Hi, 1. You can use the same formula in calculate as in visibility. 2. Ok i forgot to add you need to explicitly mark field as readonly false() as Form Runner makes calculated fields readonly by default. Not sure what version you use but in 2018.2.1 (bug solved in the newer versions) you have to use dummy formula in readonly field like 1=2. //Jarek czw., 20 lut 2020, 00:22 użytkownik Seth Parkhurst <[hidden email]> napisał:
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/CAHFpwcUx7EUPA2difWUbN7U3hruVkS5YHVKDWVxcM1xc2veKWQ%40mail.gmail.com. |
This works perfectly thank you!
-- On Thursday, February 20, 2020 at 4:19:42 AM UTC-6, Jarek wrote:
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/df30b165-b9a9-4833-be5d-93e8cc928057%40googlegroups.com. |
Free forum by Nabble | Edit this page |