An open API service indexing awesome lists of open source software.

https://github.com/nullvoxpopuli/ember-spicy-forms

Form library that lets you handle the presentation
https://github.com/nullvoxpopuli/ember-spicy-forms

Last synced: over 1 year ago
JSON representation

Form library that lets you handle the presentation

Awesome Lists containing this project

README

          

ember-spicy-forms
==============================================================================

Helpers for universal form control.

Notes:
- https://www.npmjs.com/package/validated-proxy
- https://github.com/ololabs/principled-forms
- https://github.com/gossi/spomoda/blob/master/web/app/utils/changeset.ts
- https://github.com/gossi/spomoda/blob/master/web/app/ui/components/skill-form/template.hbs

Goals:
- integration with validation libraries
- able to be given some object that knows how to persistent state (to maybe local storage in case of browser refresh, or computer crash)
- can be given a pojo
- provide helpers for decoupling UI from the from.
- let the user decide when and how to validate?

Maybe Goals:
- store history of change sets (would allow for undo)
- multi stage forms?

API Ideas

```hbs

{{#form.helpersFor 'firstName' as |firstName|}}

{{#if firstName.hasError}}
{{firstName.error}}
{{/if}}

First name

{{/form.helpersFor}}

{{#form.helpersFor 'hasNotifications' as |hasNotifications|}}

Enable Notifications?

{{/form.helpersFor}}

```

Maybe if/when we get hash-splatting, "splashes"?:
```hbs

{{#form.helpersFor 'firstName' as |firstName|}}

{{#if firstName.hasError}}
{{firstName.error}}
{{/if}}

First name

{{/form.helpersFor}}

{{#form.helpersFor 'hasNotifications' as |hasNotifications|}}

Enable Notifications?

{{/form.helpersFor}}

```

Compatibility
------------------------------------------------------------------------------

* Ember.js v3.12 or above
* Ember CLI v3.12 or above
* Node.js v8 or above

Installation
------------------------------------------------------------------------------

```
ember install ember-spicy-forms
```

Usage
------------------------------------------------------------------------------

[Longer description of how to use the addon in apps.]

Contributing
------------------------------------------------------------------------------

See the [Contributing](CONTRIBUTING.md) guide for details.

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).