You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error Notification
Produce an error notification at the top of the form if there are any errors via f.error_notification.
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'
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
Independent Labels
You should be able to render a label independent of an input (e.g. f.label :attribute_name).
Required fields
Add an indication of whether a field is required (do we hook into reform?).
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?
i18n support
If we look to add 1 or 6 we should also enable translations.
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.
Error NotificationProduce an error notification at the top of the form if there are any errors via
f.error_notification.HintsThese 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'Independent ErrorsYou should be able to render an error for an attribute directly by calling
f.error :attribute_name. Very useful for hidden fieldsIndependent LabelsYou should be able to render a label independent of an input (e.g.
f.label :attribute_name).Add an indication of whether a field is required (do we hook into reform?).
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: falseto ensure that a label isn't rendered.Maybe a middle ground would be to make this a configurable option?
If we look to add 1 or 6 we should also enable translations.
Collection helpersCurrently 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.