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

different field types #6

Closed
superstructor opened this issue Oct 27, 2015 · 3 comments
Closed

different field types #6

superstructor opened this issue Oct 27, 2015 · 3 comments

Comments

@superstructor
Copy link

Hi @mamund,

Thanks for the interesting spec!

Have you considered how to represent different field types; e.g.

  • date picker
  • time picker
  • checkboxes
  • radio buttons
  • toggles / switches
  • select boxes
  • value ranges
  • file uploads
  • email (on mobile uses different keyboard etc)
  • passwords
  • lists / multi-selection select boxes
    etc
@mamund
Copy link
Owner

mamund commented Oct 27, 2015

@superstructor

good to see your feedback.

i've thought a bit about the rendering instructions, but not acted on them yet.

right now, the focus is on describing the arguments and their constraints (required, readOnly, regex).

adding rendering details is definitely a possibility and i'd like to see them as OPTIONAL elements that appear as extensions of the property element.

{"name":"hatSize",
 "value":"",
 "prompt":"Select Hat Size",
 "required":true,
 "render": {
    "type":"dropdown",
    "options":[
      {"value":"7","text":"Regular"},
      {"value":"7.5","text":"Irregular"}
    ]
  }
}

much of this could be "stolen" from HTML5 but considerations must be made for native apps and other platforms, too.

as long as these are done as OPTIONAL extensions and designed in a way to make it easy to find/parse (and ignore) them, i'm cool with it.

if you're interested in doing a sample design (and associated implementation), feel free to do a fork and PR. love to see it.

cheers.

@mamund
Copy link
Owner

mamund commented May 1, 2016

@superstructor

note issue #9 addresses some of your options.

also, would be happy to see you design/suggest some of the features you have in your list as HAL-FORMS extensions

@evert evert mentioned this issue Oct 25, 2020
5 tasks
mamund added a commit that referenced this issue Dec 14, 2020
Merge pull request #44 from RWCBook/master
@mamund
Copy link
Owner

mamund commented Dec 18, 2020

closed -- follow-ups in #36 and others.

@mamund mamund closed this as completed Dec 18, 2020
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

2 participants