Prevent blank text input and ensure that a selection was made

I am using XLSform, and the first form was good, but now I was requested to add a much longet list of items.
I am now using groupings for selection entries.

I am struggling to ensure that a group with two selections can't be skipped. I want an error that say something in the line of "Select an Option under Drivers" in stead of the standard "Sorry that response is required." when required is set to "yes". I want to skip a question if the data is not available so it can be edited later.

The other problem is ensuring that there is no blank in a text field.
The constraint I use with a text field is .!= ''
But it simply ignores if the input is blank.

How can I change this behaviour or do I need to hand edit the XML?

You need to specify true() under the required column to ensure that the
user enters something in the text field. An empty string is treated the
same as if no data was entered. By requiring the user to enter data, you
are requiring that the string/field be non-empty.

You can specify the message to display when a required field is not
specified just like you can with a constraint fails. Create a
"required_message" column and specify the text you want to display when the
required formula evaluates to true and the user does not enter a value in
the field.

··· On Tue, Sep 16, 2014 at 4:55 AM, wrote:

I am using XLSform, and the first form was good, but now I was requested
to add a much longet list of items.
I am now using groupings for selection entries.

I am struggling to ensure that a group with two selections can't be
skipped. I want an error that say something in the line of "Select an
Option under Drivers" in stead of the standard "Sorry that response is
required." when required is set to "yes". I want to skip a question if the
data is not available so it can be edited later.

The other problem is ensuring that there is no blank in a text field.
The constraint I use with a text field is .!= ''
But it simply ignores if the input is blank.

How can I change this behaviour or do I need to hand edit the XML?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

1 Like