single checkbox - required: what does it mean?

25 views
Skip to first unread message

Jarosław Kowalewski

unread,
Nov 17, 2020, 10:09:47 AM11/17/20
to orb...@googlegroups.com
Hi,
For a single checkbox there is always value true/false (That's ok). But in such case field is always 'correct' even if the field is not check - for condition required = yes. The behavior is not obvious and a little confusing. 
The only fix is to use formulas required like "./text() = 'false' " but in the result after the field is checked star disappears.
image.png

image.png

//Jarek

Alessandro Vernet

unread,
Nov 17, 2020, 9:01:29 PM11/17/20
to orb...@googlegroups.com
Hi Jarek,

Yes, I agree. Should making a Single checkbox "required" be "mapped" to a
constraint `. = 'true'` in the source? I reckon this would make sense.

Thinking out loud, the thing is that Form Builder doesn't have a knowledge
of specific XBL components, so we would need a mechanism for XBL components
to declare that required is enforced using a constraint they provide. When
users mark the filed as required, Form Builder would add the constraint, and
conversely, when it finds that constraint, it would indicate the field as
required in the Control Settings. Maybe inside:

<fb:metadata>
<fb:validation>
<fb:required constraint=". = 'true'"/>
</fb:validation>
</fb:metadata>

We'll need to think some more about this one! And of course, just let me
know if I missed your point.

-Alex

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

Alessandro Vernet

unread,
Nov 20, 2020, 1:25:20 AM11/20/20
to orb...@googlegroups.com
Hi Jarek,

We gave some more thoughts about this, and I think came up with a better
design, which is described in the following 2 RFEs. And of course, you'll
let me know if you have any feedback about this.

https://github.com/orbeon/orbeon-forms/issues/4709
https://github.com/orbeon/orbeon-forms/issues/4710

Bruno Milagre

unread,
Mar 3, 2021, 3:25:19 PM3/3/21
to Orbeon Forms
Hi Alex,

Are the RFEs you mentioned available with the new versions or do you have to add them somehow?

I would like to make sure before updating, currently we have version 2018.1.1 installed.

Alessandro Vernet

unread,
Mar 9, 2021, 1:03:08 AM3/9/21
to orb...@googlegroups.com
Hi Bruno,

Unfortunately, these haven't been implemented yet, but I added +1 from you.
Reply all
Reply to author
Forward
0 new messages