I want to get the Webform submitted value using Webform module API.
How can I do that?
I've got these link regarding webform hooks
Working with the Webform API (version 3.x only)
that contain these links
http://drupalcode.org/project/webform.git/blob/HEAD:/webform_hooks.php
http://api.lullabot.com/file/contrib/webform/webform_hooks.php
自定义编码:添加高级验证或提交代码 -通过print_r或dsm(开发模块)研究$ form_state结构,并在mywebform_extra_submit_44
函数中找到您提交的数据。
Here is how I did it, the form was just an email address.
function mymodule_webform_submission_insert($node, $submission)
{
$value = array_shift($submission->data);
$value = array_shift($value['value']);
//$value is now the first value entered (in the case of multi-entry fields) or only value entered
}
Both node and submission are stdClass objects.
(Done in drupal 6)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.