Add hook alter to WebformSubmitResource

Created on 31 July 2024, 6 months ago

Problem/Motivation

Currently there is no o way to add custom code before submission is created.
Hook_alter can be useful in case if you need to execute custom logic when a form is submitted.
For example:

  1. change submitted data on the fly to match specific criteria
  2. create another entity based on the submitted data
  3. add custom validation (ReCaptcha for all forms, or validate specific token etc)
  4. etc

Proposed resolution

Add alter hook at the beginning of the WebformSubmit Post resource

Feature request
Status

Needs review

Version

4.1

Component

Code

Created by

🇧🇾Belarus pavel.bulat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024