Embed FormAssembly Forms in Drupal Content

Last updated on
4 November 2023

The forms are retrieved via rest api at the time of display. They may be embeded in content as an
entityreference field.
Screenshot showing an entitity reference field

Configure the Entity Reference field with the following settings:

  • Target: FormAssembly Form
  • Mode: Simple (with optional filter by bundle)
    • Sort property: name
    • Sort direction: ascending

If you need autocomplete, #1395330: Autocomplete not working when label_callback is used in hook_entity_info() will block the default auto-complete from working. The recommended solution is to use the Views module to create an EntityReference display and use that display in your field settings for Entity Selection>
Filter and a View selected for use.
First create the view. Then add and configure the field.

Configure the Entity Reference field display to:

  • Label: Hidden
  • Format: Rendered Entity
    • View mode: FormAssembly Markup
    • Show links: no

Forms are also available on their own url at formassembly/%entity_id%

Help improve this page

Page status: No known problems

You can: