* - $account: The user that submitted the form. */ ?> <fieldset class="webform-submission-info clearfix"> <legend><?php print t('Submission information'); ?> </legend> <?php print theme('user_picture', array('account' => $account)); ?> <div class="webform-submission-info-text"> <div><?php print t('Form: !form', array('!form' => l($node->title, 'node/' . $node->nid))); ?> </div> <div><?php print t('Submitted by !name', array('!name' => theme('username', array('account' => $account)))); ?> </div> <div><?php print check_plain(format_date($submission->submitted, webform_variable_get('webform_date_type'))); ?> </div> <div><?php print check_plain($submission->remote_addr); ?> </div> </div> </fieldset>
/** * Implements hook_node_load(). */ function webform_steps_w3_node_load($nodes, $types) { // Quick check to see if we need to do anything at all for these nodes. $webform_types = webform_variable_get('webform_node_types'); if (count(array_intersect($types, $webform_types)) == 0) { return; } $defaults = webform_steps_w3_node_defaults(); // Select all webforms that match these node IDs. $q = db_select('webform', 'w'); $q->leftJoin('webform_steps_w3_progressbar', 'settings', 'w.nid=settings.nid'); $q->addfield('settings', 'nid', 'has_settings'); $result = $q->fields('w', array('nid'))->fields('settings', array_keys($defaults))->condition('w.nid', array_keys($nodes), 'IN')->execute()->fetchAllAssoc('nid', PDO::FETCH_ASSOC); foreach ($result as $nid => $settings) { // Add progressbar settings to each node. if ($settings['has_settings']) { unset($settings['has_settings']); $nodes[$nid]->webform += $settings; } else { $nodes[$nid]->webform += $defaults; } } }