Skip to main content
deleted 5 characters in body; edited title
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

Getting How to get Webform Field data for a custom Modulemodule?

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)

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.

Thanks!

Getting Webform Field data for a custom Module

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.

Thanks!

How to get Webform Field data for a custom module?

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.

Source Link
Dan
  • 123
  • 10

Getting Webform Field data for a custom Module

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.

Thanks!