prometheusresearch-archive / react-forms

Forms library for React.
1.16k stars 112 forks source link

examples #131

Closed bsr203 closed 8 years ago

bsr203 commented 8 years ago

HI. There has been few requests for examples and issue with form values, so I made some runnable examples based on the one in Readme. Still need some styling and more examples for custom (DateTime, select,..) fields. Let me know what you think. Run it as node examples/server.js

bsr203 commented 8 years ago

There were some issue in the examples in Readme.

  1. Customizing label rendering:
import {Field as BaseField, Label as BaseLabel} from 'react-forms'

Label is not exported, so I used label as in the pull request.

  1. Pattern for reusable forms

I think we still has issues mentioned in https://github.com/prometheusresearch/react-forms/issues/99 will dig further later.

  1. Validation

well, the validation really doesn't show up as the default is text field. so, I added an integer field. Validation works, but, we need an adapter to parse and set integer value as in https://github.com/prometheusresearch/react-forms/issues/125

will improve on these examples, including some styling, if you like.

andreypopp commented 8 years ago

Awesome, thanks!