This module allows users to add a flag to webform submission.

Here are some example use-cases:

  • Client wants to be able to mark which contact submissions have been viewed
  • Form collects resumes or job applicants and can be flagged as "Follow up"
  • A teacher using webform to collect answers could flag the submission as correct or incorrect

Attached are some pictures of the module working

Here is a demo site to play around with the functionality: http://webformflag.lucasr.com
name: demo
pass: demo

A friend of mine, carwin, came up with a great idea for a module

Comments

Jackinloadup’s picture

Oops accidentally submitted the issue. To wrap up what i said above.

I am submitting this to webform and not the flag module because as it stands now this module does a menu_alter on the webform-results page. If the module was included i would hope to avoid that.

Thoughts?

quicksketch’s picture

I'd probably like to avoid adding this module to the Webform project. As the author of both of the modules in question (Webform and Flag), I can see some value in combining the powers of the two projects, but I also think that this is not a frequent-enough situation to warrant inclusion directly in the Webform project. I'd love this module to be available as a contrib solution, but as a separate project rather than bundled with Webform directly.

Note that you shouldn't need to do any hook_menu_alter() to accomplish this task (I assume you need this to add the flag link into node/x/results?). You could add the necessary rows and header column by implementing hook_prepreprocess_webform_results_submissions() and adding the necessary items into $vars['table']['#header'] and $vars['table']['#rows'].

Jackinloadup’s picture

Awesome thanks for the heads up. I haven't yet registered for CVS so I will start that process now.

I'm so glad there is a hook for that. I don't know how I missed it. I suppose it was just late.

Thanks again.

Jackinloadup’s picture

Status: Needs review » Closed (won't fix)

Thanks Quicksketch, I implemented the hook_prepreprocess_webform_results_submissions. The resulting code is much cleaner.

For anyone wanting the module you can find it on Github.
https://github.com/jackinloadup/Flag-Webform-Submissions/tree/6.x

I will submit it to d.o when the GIT migration is complete.

salientknight’s picture

This works great, but is there anyway to go make the submitting user available to rules? Right now, only the flagging user is available.

trevorbradley’s picture

Subscribing.. This is exactly what I need for my project right now!

EDIT: Darn it: "An illegal choice has been detected. Please contact the site administrator." I can't get it to work.

EDIT2: Strike that, it requires Flag 2.x

EDIT3: OK, pretty cool. Sorting by flag doesn't seem to work. And unfortunately I was hoping to filter the results to see only flagged results, but I can't seem to make this work in views.

It's a neat concept though, looking forward to seeing it as a module.

amjad1233’s picture

nothing for 7 ?