New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check current page for errors before moving to Next page #326

Closed
alxndrsn opened this Issue Oct 9, 2015 · 12 comments

Comments

Projects
None yet
4 participants
@alxndrsn
Copy link
Collaborator

alxndrsn commented Oct 9, 2015

As suggested in #320:

upon page next click, block UI to check current page for errors

I don't think it will be necessary to check on Prev.

@alxndrsn

This comment has been minimized.

Copy link
Collaborator

alxndrsn commented Oct 9, 2015

Is there any chance of problems if earlier fields depend on input in later fields to pass validation? Seems like a very weird/bad/incorrect form design, but perhaps others have seen valid uses?

@MartijnR

This comment has been minimized.

Copy link
Member

MartijnR commented Oct 9, 2015

Thanks for adding this issue.

Yes, there is definitely an issue with that. However, this would make it behave closer to ODK Collect. There have been some requests to do this (kobotoolbox/enketo-express#300).

I guess this would be a case of the benefits outweighing the 'costs'.

If it is necessary to have such forward-looking logic, I guess only the default (non-pages) mode would be an option. However, we could also consider adding a setting (a class on the body) that does not add the page-flip-validation (i.e. keeps the current behaviour but requires that setting).

@abbyad

This comment has been minimized.

Copy link

abbyad commented Oct 9, 2015

From my experience you encounter the same form design issue in Collect already. If you have validation that relies on a later field the validation for the earlier page will always fail.

If you find yourself in this situation you can skip directly to another field in Collect, but not in Enketo.

@MartijnR

This comment has been minimized.

Copy link
Member

MartijnR commented Oct 9, 2015

Yes, with KoBo we were discussing to add some way to bypass like ODK Collect. But it seems to me that is a bit weird. Why have the protection and allow bypassing it? Not sure, including whether to still keep 'Go to End'.

@abbyad

This comment has been minimized.

Copy link

abbyad commented Oct 9, 2015

Skipping from section to section may make sense for some long forms (something like big government tax forms), however we've never had a use for it yet. For what its worth, we are hiding 'Go to End' right now.

@MartijnR

This comment has been minimized.

Copy link
Member

MartijnR commented Oct 9, 2015

Thanks. So you just have Back, Next and Go to Beginning. I think that makes sense when the flow is restricted.

So maybe this:
page-validate enabled (default): Back, Next, Beginning
page-validate disabled: Back, Next, Beginning, End (maybe in future: Jump to section)

@abbyad

This comment has been minimized.

Copy link

abbyad commented Oct 9, 2015

We removed Go-to-Beginning for now pending more user testing, but the way you have it makes sense for general use.

alxndrsn added a commit to alxndrsn/enketo-core that referenced this issue Oct 14, 2015

alxndrsn added a commit to medic/enketo-core that referenced this issue Oct 14, 2015

MartijnR added a commit that referenced this issue Oct 14, 2015

@alxndrsn

This comment has been minimized.

Copy link
Collaborator

alxndrsn commented Oct 16, 2015

Seems to be working - I think this can be closed.

@MartijnR

This comment has been minimized.

Copy link
Member

MartijnR commented Oct 16, 2015

Yes, thanks for that. Very useful addition. I asked some people to comment on the new feature, wrt to the First/Last buttons and a possible Jump-to-section. I am leaving it open for a weeks to see if they want to comment.

@ccollins0601

This comment has been minimized.

Copy link

ccollins0601 commented Oct 27, 2015

Hi Martijn,
This is great. We're trying to break it now. So far so good, will let you know if we find any problems.

Regarding navigation, at OC our ideal would be to always have the Back, Next, Beginning, End, and 'Jump to Section' always show, whether the validate capabilities are disabled or not. Though this would allow you to 'cheat' and still get to the end, it looks like the form submit still re-validates and catches it.

An idea for 'Jump to Section' - have a '3 dot' menu in upper right (e.g. https://cdn-images.xda-developers.com/direct/2/2/5/7/4/5/8/Screenshot_2013-09-14-18-25-55.jpg) that opens a drop-down list of sections. One other comment: hidden/conditional pages should appear in the jump to section only after they are shown on the form.

@alxndrsn

This comment has been minimized.

Copy link
Collaborator

alxndrsn commented Dec 22, 2017

I am leaving it open for a weeks to see if they want to comment.

Can we close it now? 😉

@MartijnR

This comment has been minimized.

Copy link
Member

MartijnR commented Dec 22, 2017

yes! :)

@MartijnR MartijnR closed this Dec 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment