Getting Webform Field data for a custom Module

by Dan   Last Updated January 12, 2018 23:07 PM

I'm trying to set up a view permission based on a webform field. I've been able to get to my custom module using hook_webform_submission_access().

So I have an email field in the webform, and I want to check that based on the current user's email address. Should be pretty simple, I just can't get the field data. Anyone know?

Example: if ($submission->data['field_email'] == $user->mail)

What is the correct syntax instead of $submission->data['field_email']

I'm on Drupal 7 and Webform 4.x branch.


Tags : 7 webform

Related Questions

Webform Rules - Create a Drupal User

Updated November 24, 2017 14:07 PM

Hide webform after the user's first submission

Updated May 16, 2017 17:07 PM

How to get instant result after submitting webform?

Updated September 14, 2017 12:07 PM