1

I've placed a copy of the webform-submission page in my sites theme folder, and am modifying it to display the submissions pages how I would like. At the moment, to print an elements value, I use:

$submission->data[n]['value'][0]

Where data[n] is specific to the element in the webform. Is there any way I can use something more like $submission->data[element_key]['value'][0] to get the field info. It just makes for much easier reading, especially since I won't be the person maintaining the site.

Thanks.

p.s. this is in Drupal 7, webform 3.0

1 Answer 1

0

The $usbmission array is built in the function webform_get_submissions.

Notice that the table which contains the element_key data you're looking for (webform_component table) is not queried in this function.

So if you want that data, you would have to fetch the element_key information yourself and rebuild the $submission array in an implementation of hook_webform_submission_load.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.