Skip to content
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

Add support for answers given as a range #38

Closed
getodk-bot opened this issue Sep 5, 2016 · 10 comments
Closed

Add support for answers given as a range #38

getodk-bot opened this issue Sep 5, 2016 · 10 comments

Comments

@getodk-bot
Copy link
Member

Issue by mitchellsundt
Thursday Jul 09, 2015 at 17:38 GMT
Originally opened as getodk/getodk#187 (3 comment(s))


Originally reported on Google Code with ID 186

Enhancement.

Many answers we get are given as a range: 1-2 weeks, 3-4 days, etc.  Is there some
way that a type of answer can be a range (I'm thinking two sliders of numbers, like
the ones used for dates?)

Reported by Emily.Kumpel on 2011-02-17 17:50:51

@getodk-bot
Copy link
Member Author

Comment by mitchellsundt
Thursday Jul 09, 2015 at 17:38 GMT


Reported by wbrunette on 2011-03-01 05:06:10

  • Labels added: Type-Enhancement
  • Labels removed: Type-Defect

@getodk-bot
Copy link
Member Author

Comment by mitchellsundt
Thursday Jul 09, 2015 at 17:38 GMT


Reported by mitchellsundt on 2011-07-09 03:50:53

  • Labels added: Collect

@getodk-bot
Copy link
Member Author

Comment by jnordling
Thursday Sep 01, 2016 at 20:13 GMT


I like this idea, would this be a select_multiple with an appearance option for "range". humm or would that make sense, because when it is stored as a select_multiple which may not make sense due to the way aggregate stores select_multiple. Which data type are you thinking for this?

@jnordling
Copy link
Contributor

@yanokwa or @lognaturel how are you feeling about this?

@lognaturel
Copy link
Member

I don't understand the use case well enough to know how this would best be addressed. I would tend to address a range either with two questions (what is the min, what is the max) or with a text field with a regex constraint (number dash number).

I think that the original poster may have meant a number picker instead of a slider? If you have an example of this kind of question in use or a UI sketch, that would help possibly move this forward.

@yanokwa
Copy link
Member

yanokwa commented Apr 12, 2017

I've sent an email to Emily to see if she can clarify.

I agree with @lognaturel that you can do this with two questions (max-min) or even a question that asks the number and then another question that asks what the +/- is.

@jnordling Is there a use-case that you are thinking of? What would you expect the UI to look like?

@yanokwa
Copy link
Member

yanokwa commented Apr 18, 2017

I got a response from Emily!

When we were setting up the survey, we would ask a question like “How many days in the month does the water usually come” and answers like “3”, “3-4”, or, “3-5”… etc. We tried to do these on two separate questions, but it confused the enumerators when they didn’t get a range (i.e., do they enter 3 twice if the answer is just ‘3’?). We ended up doing a character input where they could use a ‘-’…which was okay, but meant more cleanup (I think we also tried a multi select of radio buttons so they could select 3 and 4, but that was also confusing.

I (poorly) sketched out what I was thinking in the attached photo. For the first option top option, better than my picture, think of the slider bars on Kayak when you’re looking at things like landing/takeoff time (screen shot pasted below). Else, the second option uses two of the ‘date’ style selectors...

Sketch 1
odk-issue

Sketch 2
odk-issue

I also think I filed this before it was possible to do multiple questions per page - that may have helped?

@lognaturel
Copy link
Member

Either of those interfaces would be nice and it's true that they'd be better than separate controls. I think that with either interface, something new would need to be introduced at the ODK XForms spec level.

To make matters a little more confusing, W3C XForms does include a range control described here but what it does is show a slider of a certain range for a user to select a single value. Looks like @spatialdude and @MartijnR have already had some discussion about supporting it at XLSForm/pyxform#79.

So we'd have to make sure that whatever we decide on for this control type doesn't cause confusion with that other one. Also, I don't think it's possible for a control to provide two values so either the range would have to be represented as a single value (string like "X-Y" for example) or the widget would need to be represented as two separate controls in the form. One wacky idea would be to have a group appearance that can combine two range controls or two spinner controls (as in #105).

@MartijnR I'd be interested on some initial high-level feedback on whether you think this is a good thing to support and then if so I can file a issue in the XForms spec repo.

@MartijnR
Copy link
Contributor

Yes, let's discuss capturing a range as a spec addition and see if there is a nice way to do this. Hopefully something that already exists or that builds upon a range control that captures a single value.

@lognaturel
Copy link
Member

Closing pending spec addition.

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

No branches or pull requests

6 participants