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

Describe defaults of optional range attributes #184

Closed
MartijnR opened this issue May 29, 2018 · 7 comments
Closed

Describe defaults of optional range attributes #184

MartijnR opened this issue May 29, 2018 · 7 comments

Comments

@MartijnR
Copy link
Contributor

min=[minimum value] (default 1)
max=[maximum value] (default 10)
step=[step size] (default 1)

@MartijnR MartijnR self-assigned this May 29, 2018
@lognaturel
Copy link
Member

Should this perhaps be an XLSForm issue? I know we discussed defaults there for convenience but I thought we were making them required at the XForms level.

@MartijnR
Copy link
Contributor Author

Oh yes, that's an option. In XForms they are all optional (without defaults apparently, so that's weird) so we'd have to clarify the requiredness in this spec then.

@MartijnR
Copy link
Contributor Author

Shall we document that we deviate by making them all required?

@lognaturel
Copy link
Member

lognaturel commented Jun 13, 2018

Does https://www.w3.org/TR/xforms11/#ui-range say that defaults can be specified in the model for all range elements in a form? Do you know what that syntax would look like? I don't think we have a precedent for doing something like that so I'd be comfortable with saying they're required in the body.

Another deviation is that we only have defined them for integers and decimals, not for dates and the other semantic types this spec doesn't support (e.g. year).

@MartijnR
Copy link
Contributor Author

Not sure. It could be that they are referring to constraints there.

I'd be happy with making them required. It's clear and as you said we have XLSForm/ODK Build to apply default values to the XForm anyway, so almost nobody is inconvenienced.

@MartijnR
Copy link
Contributor Author

Also would be easy to remove the requirement unlike adding it later.

@lognaturel
Copy link
Member

It could be that they are referring to constraints there.

Seems possible.

Also would be easy to remove the requirement unlike adding it later.

Good point. Ok, let's do required.

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

No branches or pull requests

3 participants