# DruxtEntityForm ⇐ DruxtEntity

The <DruxtEntityForm /> component uses Drupal's Form displays modes for content creation and editing.

Features:

  • Extends DruxtEntity component
  • Form submission and error handling
  • Scoped slots

Extends: DruxtEntity
See: DruxtEntity
Example

<DruxtEntityForm
  :type="resourceType"
  :uuid="uuid"
  mode="displayMode"
  v-on:error="onError()"
  v-on:reset="onReset()"
  v-on:submit="onSubmit()"
/>
1
2
3
4
5
6
7
8

# .onReset()

Reset event handler:

  • Sets model back to entity value.
  • Unsets response data.
  • Emits reset.

Kind: instance method of DruxtEntityForm


# .onSubmit()

Submit event handler:

  • Sends data to backend via POST or PATCH.
  • Catches errors.
  • Emits submit or error event.

Kind: instance method of DruxtEntityForm


# .extends

Kind: static property of DruxtEntityForm
See: DruxtEntity


# .props

Vue.js Properties.

Kind: static property of DruxtEntityForm


# .schemaType : 'view' | 'form'

Drupal display schema type, 'view' or 'form'.

Kind: static property of props
Default: form


# .computed

Vue.js Computed properties.

Kind: static property of DruxtEntityForm


# .errors ⇒ Array.<object>

An array of errors if present in the form submission response data.

Kind: static property of computed


# .data()

Vue.js Data object.

Kind: static method of DruxtEntityForm
Properties

Name Type Description
response object The form submission response data.
submitting boolean Whether the form is currently being submitted.