Hello,
On my drupal site, I want to run an experiment where a set of users (with the role "assessor") have access to three different webforms that I want them to fill in so I can collect data. Each form is quite different, and they only need to submit each once. Each of them has "save as draft" enabled. When they've submitted all three, it's likely they won't come back.
I want them to gain access to these three forms from an "assessor area" node, where they can view.
I'd like that node to appear as follows (in the example, assessment one has been started and saved as a draft, assessment two hasn't been started, and the questionnaire [i.e. assessment three] has been completed):
==Assessment one==
Status: incomplete
Continue assessment one
==Assessment two==
Status: not started
Begin assessment two
==Questionnaire==
Status: complete
Complete: access disabled
Can I do this with a view? I'm not averse to using PHP to accomplish it.
Thanks for your time.
JB
Comments
Comment #1
dawehnerLet's move to webform
Comment #2
quicksketchThis unfortunately isn't possible for several reasons (all of which should be corrected in Webform):
- You can't start with "Node" view and then make a relationship over to the Webform Submissions table. This is necessary to build a listing of nodes that *have not* had their attached webforms submitted. That makes a item like this impossible:
- The "draft" column is not exposed at all to Views, making the "Status" column like this impossible:
- You may be able to use the existing "User: Submission count" field that Webform provides to determine if a user has started a form at all, but this handler also has some problems, see #921978: Webform Views Sorting. It may work well enough as is, but it also needs some work.
So the bottom line here is that this *should* be possible if Webform's Views integration were up to snuff, but right now it's got several problems that make this difficult or impossible. The Views integration should be improved to support the functionality you want.
Comment #3
quicksketchAh, in fact there is a "Webform submissions: Draft" field that you can use to accomplish the second point that I mentioned. Meaning the only thing not supported is a list of webform submissions by starting with a "Node" view.
Comment #4
quicksketchComment #5
quicksketchMarked #1159790: Matching results as duplicate.
Comment #6
derhasi CreditAttribution: derhasi commentedThis will be solved by fixing #1258044: Webform views integration needs to provide relationships for both user and node based views. as this will (hopefully) introduce a node to webform submission relationship.
Comment #7
derhasi CreditAttribution: derhasi commented