silverstripe-framework/admin/client/src/components/FormBuilder
2016-08-16 11:09:19 +12:00
..
tests Make 'form' state key singular rather than plural 2016-04-26 15:32:10 +12:00
FormBuilder.js Improve FormBuilder API and added HeaderField and LiteralField 2016-08-16 11:09:19 +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.