Closed (fixed)
Project:
Webform Views Integration
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2017 at 22:12 UTC
Updated:
20 Jun 2018 at 15:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bserem commentedI second that!
@wunter8, while the webform_views module "exports" webform data in view fields and filters, it doesn't do so in contextual filters.
You can see this here: https://docs.google.com/spreadsheets/d/1_wxB3f1EToDxzP53mIIz89LUf07PPKJz...
Comment #3
bucefal91 commentedHello, guys!
Yes, until now there was no support for arguments within this module. But yes, that's very good to have it included. I provide a rather small patch but it globally enables context filters for all the elements. It's a pretty dumb "string to string" comparison. But it should cover lots of cases (probably the most).
And then we can tailor experience for some specific elements to more appropriate "argument" logic. Check this patch out and let me know how it looks. I've tried it on "text field", "number" and "date" elements.
Comment #4
no sssweat commented@bucefal91 thank you for making the patch. It works like a charm.
- Patch applied cleanly.
- On numbers, (positive and negative) it worked.
- Text field, worked.
- Taxonomy term ref, worked using term id (tid).
- Created date & custom date field worked using YEAR-MM-DD format.
- Radio button worked when using the key (what webform calls option value).
Comment #6
bucefal91 commentedThanks for testing it! Committed into dev snapshot :)
Comment #8
andileco commented@bucefal91, I updated to the latest -dev in order to test this. I was able to add a field from my Webform, as requested in this issue. However, the "Webform submission: Submitted to: Entity ID" handler broke.
Comment #9
no sssweat commented@andileco I am using 8.x-5.0-alpha5 and applied the patch above to it and do not see a "Submitted to: Entity ID" option
So maybe the issue is not the above patch, and maybe someone added the "Submitted to: Entity ID" functionality to dev on some other issue??? (if it even exist, because I was not able to find it by doing a quick search on the issues list). If it exists the the bug is probably there and not here.
Comment #10
no sssweat commented@andileco I do however see a "Submission ID" option and using that works fine. Just be careful because the Submission ID is not the same as the number given in the "#" column of /admin/structure/webform/manage/report/results/submissions.
If you add the submission ID to your view as a field you will see these two numbers do not match.
Comment #11
andileco commentedHere's what it looked like before I updated:
I'm likely using a newer version of Webform, which is probably where that field comes from. But I wonder why that one would be breaking with this update, as the others seem fine.
Comment #12
andileco commentedThe problem seems to be here (it was for a different patch...will need to find where it occurred):
I heard from @jrockowitz that 'entity_id' was the ID used for the field I'm missing now.
Comment #13
andileco commentedI changed the first line to:
and that restored "Webform submission: Submitted to: Entity ID".
@bucefal91, I will create a separate issue recommending this modification.