Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

CiviCRM Form Builder Blocks

Security covered Under active development 58 sites

This module allows you to embed CiviCRM forms and their associated Search Kit displays directly into your Drupal website using blocks. You can place these forms anywhere within your site's layout, including in the block layout system or within Layout Builder.

Embed CiviCRM Form Builder forms and SearchKit displays anywhere on your Drupal site. This module provides a "CiviCRM Form Builder block" block type, so any Afform you build in CiviCRM (a submission form, a search form, a dashboard of SearchKit displays) can be placed like any other Drupal block.

Features

  • Place any Form Builder form (Afform) in a theme region from the Block layout page.
  • Add forms to Layout Builder layouts as inline blocks.
  • Reference forms from content with the Block Field module.
  • Loads the CiviCRM and AngularJS resources for you, only on pages where a form block is displayed.
  • Several form blocks can be shown on the same page.
  • Output is rendered through a Twig template (afform-block.html.twig) that themes can override.

New to Form Builder? See the Form Builder documentation.

Requirements

  • CiviCRM with the Form Builder (Afform) extension enabled
  • 1.1.x: Drupal 11.4 or later, or Drupal 12
  • 1.0.x: earlier versions of Drupal

Installation

composer require drupal/civicrm_form_builder_blocks

Then enable the module as usual. There is nothing to configure.

Usage

Block layout

  1. Go to Structure → Block layout.
  2. Click "Place block" for a region.
  3. Find "CiviCRM Form Builder block" and click "Place block".
  4. Choose the form to embed from the "Form Name" list.
  5. Set visibility as needed and save.

Layout Builder

Add a block to a section and choose "CiviCRM Form Builder block", then select the form.

Block Field

Add a Block Field field to an entity type and select "CiviCRM Form Builder block" when editing content.

Good to know

  • The form's title is displayed above the form, as set in Form Builder.
  • Afforms of type "block" (reusable fragments meant to be embedded in other forms) are not offered in the list.
  • Form blocks are not cached, because the form's resources are loaded per request.

Development

Maintained by Mark Hanna at Skvare, supporting and developing Drupal and CiviCRM since 2008.

Like this but need it to do more? Contact Skvare to contract development from our professional CiviCRM and Drupal developers.

Drupal 11 · not 10

Ask your assistant about CiviCRM Form Builder Blocks

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
14
Tracked since
Aug 2024
Latest release
2 weeks ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.1.0 Stable 11 Nov 10, 2026
1.1.x-dev Dev 11 Nov 10, 2026
1.0.0 Stable 10–11 Oct 24, 2024
1.0.0-beta5 Pre-release 10–11 Aug 15, 2024
1.0.0-beta4 Pre-release 10–11 Aug 15, 2024
1.0.0-beta3 Pre-release 10–11 Aug 15, 2024
1.0.0-beta2 Pre-release 10–11 Aug 15, 2024
1.0.0-beta1 Pre-release 10–11 Aug 14, 2024
1.0.0-alpha5 Pre-release 10–11 Aug 13, 2024
1.0.0-alpha4 Pre-release 10–11 Aug 12, 2024