API Documentation

DruxtEntityForm

entity

DruxtEntityForm ⇐ DruxtEntity

Renders a Drupal Content Entity form with submission and validation support.

Extends: DruxtEntity
See: DruxtEntity
Example

<DruxtEntityForm
  :type="resourceType"
  :uuid="uuid"
  mode="displayMode"
  v-on:error="onError()"
  v-on:reset="onReset()"
  v-on:submit="onSubmit()"
/>

.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

NameTypeDescription
responseobjectThe form submission response data.
submittingbooleanWhether the form is currently being submitted.