Required_message help

Hi,

I want to display a custom message when a required question isn't 

answered. I thought this would be easy but I'm not doing something right.
If I make a bind like this:

I thought all I had to do is add required_message to the same bind like so:

However, it doesn't seem to work like that. I can't seem to find any
reference showing the actual code of how it works.

I'm sure this is ridiculously simple but if anyone could show me the
actual code I would greatly appreciate it.

Thank you!

There are two ways to define this.

(1) most useful:

The first is to supply a ':requiredMsg' translation in the section
for that prompt.

<text id="yourpromptfieldpath:requiredMsg">
        <value>Note for Translator: You must enter this value!</value>
</text>

This allows translations for the message.
The same is possible for the constraint message. You can specify a
":constraintMsg" translation.

(2) ODK Collect also accepts a jr:requiredMsg attribute on the tag,
in a manner identical to the jr:constraintMsg. The disadvantage of this
mechanism is that it does not support multiple translations.

··· On Wed, Mar 30, 2016 at 8:54 AM, Greg wrote:

Hi,

I want to display a custom message when a required question isn't

answered. I thought this would be easy but I'm not doing something right.
If I make a bind like this:

I thought all I had to do is add required_message to the same bind like so:

However, it doesn't seem to work like that. I can't seem to find any
reference showing the actual code of how it works.

I'm sure this is ridiculously simple but if anyone could show me the
actual code I would greatly appreciate it.

Thank you!

--

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

I used option 2, just because this is a quick form and we are very
uni-lingual here and it worked great in ODK Collect 1.4.7 on Aggregate
1.4.7. Thank you again!

Validate 1.4.6 doesn't like it though. I'll include the error I received
below for two lines in my form just in case you find it useful.
Otherwise I'm happy.

Parsing form...
Title: "Goose Survey"
XForm Parse Warning: Warning: 1 Unrecognized attributes found in Element
[bind] and will be ignored: [requiredMsg] Location:

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/GPSpoint" type="geopoint" 

requiredMsg="A GPS point is required for the egg nest." required="true()"/>

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/GPSpoint" type="geopoint" 

requiredMsg="A GPS point is required for the egg nest." required="true()"/>

XForm Parse Warning: Warning: 1 Unrecognized attributes found in Element
[bind] and will be ignored: [requiredMsg] Location:

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/ParkList" type="select1" 

requiredMsg="Please indicate which park you are counting geese or eggs in."
required="true()"/>

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/ParkList" type="select1" 

requiredMsg="Please indicate which park you are counting geese or eggs in."
required="true()"/>

··· >> Xform parsing completed! See above for any warnings.

Xform is valid! See above for any warnings.

On Wednesday, March 30, 2016 at 12:54:41 PM UTC-6, Mitch Sundt wrote:

There are two ways to define this.

(1) most useful:

The first is to supply a ':requiredMsg' translation in the section
for that prompt.

<text id="yourpromptfieldpath:requiredMsg">
        <value>Note for Translator: You must enter this value!</value>
</text>

This allows translations for the message.
The same is possible for the constraint message. You can specify a
":constraintMsg" translation.

(2) ODK Collect also accepts a jr:requiredMsg attribute on the tag,
in a manner identical to the jr:constraintMsg. The disadvantage of this
mechanism is that it does not support multiple translations.

On Wed, Mar 30, 2016 at 8:54 AM, Greg <greg....@edmonton.ca <javascript:>> wrote:

Hi,

I want to display a custom message when a required question isn't 

answered. I thought this would be easy but I'm not doing something right.
If I make a bind like this:

I thought all I had to do is add required_message to the same bind like
so:

However, it doesn't seem to work like that. I can't seem to find any
reference showing the actual code of how it works.

I'm sure this is ridiculously simple but if anyone could show me the
actual code I would greatly appreciate it.

Thank you!

--

Post: opend...@googlegroups.com <javascript:>
Unsubscribe: opendatakit...@googlegroups.com <javascript:>
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...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com <javascript:>

Thanks.

··· On Thu, Mar 31, 2016 at 9:51 AM, Greg wrote:

I used option 2, just because this is a quick form and we are very
uni-lingual here and it worked great in ODK Collect 1.4.7 on Aggregate
1.4.7. Thank you again!

Validate 1.4.6 doesn't like it though. I'll include the error I received
below for two lines in my form just in case you find it useful.
Otherwise I'm happy.

Parsing form...
Title: "Goose Survey"
XForm Parse Warning: Warning: 1 Unrecognized attributes found in Element
[bind] and will be ignored: [requiredMsg] Location:

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/GPSpoint" type="geopoint"

requiredMsg="A GPS point is required for the egg nest." required="true()"/>

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/GPSpoint" type="geopoint"

requiredMsg="A GPS point is required for the egg nest." required="true()"/>

XForm Parse Warning: Warning: 1 Unrecognized attributes found in Element
[bind] and will be ignored: [requiredMsg] Location:

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/ParkList" type="select1"

requiredMsg="Please indicate which park you are counting geese or eggs in."
required="true()"/>

Problem found at nodeset: /html/head/model/bind
With element <bind nodeset="/GooseSurvey/ParkList" type="select1"

requiredMsg="Please indicate which park you are counting geese or eggs in."
required="true()"/>

Xform parsing completed! See above for any warnings.

Xform is valid! See above for any warnings.

On Wednesday, March 30, 2016 at 12:54:41 PM UTC-6, Mitch Sundt wrote:

There are two ways to define this.

(1) most useful:

The first is to supply a ':requiredMsg' translation in the
section for that prompt.

<text id="yourpromptfieldpath:requiredMsg">
        <value>Note for Translator: You must enter this value!</value>
</text>

This allows translations for the message.
The same is possible for the constraint message. You can specify a
":constraintMsg" translation.

(2) ODK Collect also accepts a jr:requiredMsg attribute on the
tag, in a manner identical to the jr:constraintMsg. The disadvantage of
this mechanism is that it does not support multiple translations.

On Wed, Mar 30, 2016 at 8:54 AM, Greg greg....@edmonton.ca wrote:

Hi,

I want to display a custom message when a required question isn't

answered. I thought this would be easy but I'm not doing something right.
If I make a bind like this:

I thought all I had to do is add required_message to the same bind like
so:

However, it doesn't seem to work like that. I can't seem to find any
reference showing the actual code of how it works.

I'm sure this is ridiculously simple but if anyone could show me the
actual code I would greatly appreciate it.

Thank you!

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

--

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