silverstripe-framework/admin/client/src/components/FormBuilder
2016-07-14 17:51:01 +12:00
..
tests Make 'form' state key singular rather than plural 2016-04-26 15:32:10 +12:00
FormBuilder.js API Update react sections to use react-router instead of page.js (#5796) 2016-07-14 17:51:01 +12:00
README.md Add DetailEditForm to Campaign admin 2016-04-26 15:32:07 +12:00

FormBuilderComponent

Used to generate forms, made up of field components and actions, from FormFieldSchema data.

This component will be moved to Framweork or CMS when dependency injection is implemented.

PropTypes

actions

Actions the component can dispatch. This should include but is not limited to:

setSchema

An action to call when the response from fetching schema data is returned. This would normally be a simple action to set the store's schema key to the returned data.

createFn (func)

Gives container components a chance to access a form component before it's constructed. Use this as an opportunity to pass a custom click handler to to a field for example.

schemaUrl

The schema URL where the form will be scaffolded from e.g. '/admin/pages/schema/1'.

schema

JSON schema representing the form. Used as the blueprint for generating the form.

onSubmit (func)

Event handler passed to the Form Component as a prop.