79404259

Date: 2025-02-01 01:01:03
Score: 2
Natty:
Report link

Here's how I did this in Drupal 10:

Place this at the top of my custom module

 use Drupal\webform\Entity\WebformSubmission;

In my Controller build function:

$sub = WebformSubmission::load(2036);  //need a submission id
$data = $sub->getData();

Now you have the data in an array.

More info: https://api.druphelp.com/api/webform/src%21Entity%21WebformSubmission.php/class/WebformSubmission/8.5

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: wheelercreek