Skip to content

FormBuilder (Afform) Events

These Symfony events are dispatched by the Afform framework. Refer to their individual pages in the hooks documentation for detailed signatures, parameters, and example listeners:

  • civi.afform_admin.metadata: Dispatched to alter metadata configuration (entities, elements, input widgets, styling, etc.) for the FormBuilder GUI.
  • civi.afform.get: Dispatched to programmatically define or modify Afforms during retrieval.
  • civi.afform.prefill: Dispatched to customize default values and IDs loaded when viewing a form.
  • civi.afform.validate: Dispatched during submission to perform custom validation checks and halt form submission if errors exist.
  • civi.afform.submit: Dispatched during submission processing to control how individual entity records are saved.