Closed (fixed)
Project:
Webform
Version:
6.x-2.9
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2009 at 15:42 UTC
Updated:
21 Dec 2009 at 08:43 UTC
Scenario:
I have a table (view) of node titles, each with a "Flag me!"-link. There's a webform node attached at the bottom of the page. Would it be possible to let Webform know which of the articles on the page are flagged, and collect these titles?
Comments
Comment #1
quicksketchIt depends on what you mean by "let Webform know". What is it you want Webform to do when content is flagged?
Comment #2
perandre commentedI would love for webform to register the flagged node titles and include them in the email (with the rest of the fields). Any ideas?
Comment #3
quicksketchIncluding Flagged data in the e-mail can be done fairly easily through theming the e-mails. Copy 'webform-mail.tpl.php' to your theme, clear your Drupal cache, then add whatever extra information you want.
Comment #4
perandre commentedOh! For anonymous users, too? How would Webform know that it should send flag data from this particular page?
Comment #5
quicksketchYou can determine if a user is anonymous or not (while they filled out the form) by checking the global $user variable when the e-mail is sent. Webform runs all mails through the theme system individually, whether the user is anonymous or registered.
You can determine what flagged information needs to be shown in the e-mail by checking the $node variable within webform-mail.tpl.php (which is the fully loaded Webform node).
Comment #6
perandre commentedThanks a bunch! Looking forward to testing!
Comment #7
quicksketch