Created
October 12, 2011 15:42
-
-
Save kratkar/1281562 to your computer and use it in GitHub Desktop.
Get webform submissions data from node id(add in node-<nid>.tpl.php)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /** | |
* add in node-<nid>.tpl.php | |
* see http://drupalcode.org/project/webform.git/blob/HEAD:/includes/webform.submissions.inc#l610 | |
* output webforms submissions, pager name 'page' | |
*/ | |
if (isset($_GET['page']) && is_numeric($_GET['page'])) { | |
$pager_count = $_GET['page']; | |
} | |
$subms = webform_get_submissions(array('nid' => $node->nid), NULL, $pager_count);?> | |
<ul class="list"> | |
<?php foreach($subms as $sm):?> | |
<li class="item"><?php print $sm->name?></li> | |
<?php endforeach; ?> | |
</ul> | |
<?php | |
//for debug install devel & use of the dsm and dpm functions | |
//uncomment botom line | |
//dpm($subms); | |
//dsm($subms); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment