Skip to content


Form Builder Events


Alter metadata for the Form Builder GUI

Since: CiviCRM 5.50

Type: GenericHookEvent


  • entities (array) List of entities that can be used in the Form Builder GUI. Each one contains array keys name (string), label (string), icon (string:"fa-*"), type (string:"primary"|"secondary"), defaults (string:js object).
  • inputTypes (array) Form widgets
  • elements (array) Static elements that can be added to a form.
  • styles (array) Bootstrap3 style strings.
  • permissions (array) Permissions that can be set for an Afform.
  • dateRanges (array) Date range options.


Handle submission of an "" entity (or set of entities in the case of <af-repeat>).

Since: CiviCRM 5.31

Type: AfformSubmitEvent


  • getEntityType(): string
  • getEntityName(): string
  • getRecords(): array
  • getSecureApi4(): callable
  • setEntityId(int $index, int $id)
  • setRecords(array $records)
  • setJoinIds(int $index, string $joinEntity, array $joinIds)