8000 Missing simple-form niceities · Issue #1 · trailblazer/formular · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Missing simple-form niceities #1
Open
@fran-worley

Description

@fran-worley
  1. Error Notification
    Produce an error notification at the top of the form if there are any errors via f.error_notification.
  2. Hints
    These are built into both bootstrap and foundation and should be supported in Formular.
    You should be able to either pass a hint option to an input, or call a hint via f.hint 'hint text'
  3. Independent Errors
    You should be able to render an error for an attribute directly by calling f.error :attribute_name. Very useful for hidden fields
  4. Independent Labels
    You should be able to render a label independent of an input (e.g. f.label :attribute_name).
  5. Required fields
    Add an indication of whether a field is required (do we hook into reform?).
  6. Label text
    Can we guess a label text from the attribute name or is this a bit too magical? I was planning on something as simple as replace '_' with ' ' and making the first letter upper cased. Though I guess you've got i18n to consider.
    Most HTML specs now say that for accessibility you should include a label even if it's not visible. This would encourage people to do so and avoid lots of unnecessary call like f.input :title, label: 'Title'.
    You can already pass in label: false to ensure that a label isn't rendered.
    Maybe a middle ground would be to make this a configurable option?
  7. i18n support
    If we look to add 1 or 6 we should also enable translations.
  8. Collection helpers
    Currently we require nested arrays with value first and label last. - Now configurable via label_method and value_method
    Selects could also do with an include_blank/ prompt option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0