When are error checks carried out in Collect Mobile?

  • Asked
  • Active
  • Viewed 4298 times
0

Dear OF Team,

I have noticed recently that in Collect Mobile (CM) when a field has an error check, the validation seems to be done immediately after the field appears on the screen. This means that CM displayes (in case of required field) additionally to the "This field is required!" message the error check message before the user is able to record anything. Of course this can be fixed by testing the field itself for being empty (idm:not-blank). Is that the behavior you wanted? Am I correct in the assumptions above?

Thanks for your help!

1

Accepted answer

Hi András,
Many thanks for testing it, this is something it shouldn't happen.
We will fix this problem with the next version of Collect Mobile.
Many thanks,
Open Foris Team

0

Accepted answer

Dear András,
The error checks are evaluated only when the attributes are not empty, so checking that the field is not blank using the function idm:blank() is useless.
We will improve the way the error messages are shown in Collect Mobile so that they won't overlap with the entry fields.
Many thanks,
Open Foris Team

0

Accepted answer

Dear OF Team,

I have created a simple form with one code attribute (codes: 1, 2, 3) and added a custom error check: Condition to be verified: "$this < 4". Tested with comparison as well, it behaves the same.

As you can see in the attached screen shot, CM (1.6.6 [141]) displayes the error message without recording anything. After selecting any of the options, error messages disappear as expected. If I add idm:not-blank($this) in the Apply when field, only the default "This field is required" is displayed before editing. This looks like CM evaluates the error check while the attribute is empty, unless I'm missing something.

alt text

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Tip: type a few words from the error message, or put a tag in [brackets] to look only there.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.