I have a webform that lets users submit feedback about the site but I need to moderate the feedback that comes in.
I've set up a view that has two page outputs, one that shows all submissions that are not yet "Approved" by administrators and gives admins an option to approve them and a second page that shows all submissions to the form that are marked as "approved".
The problem I am having is that the "filter" criteria of views does not show any of the fields that make up the webform so that I can filter based upon them. They show up in the "fields" section of the view but are not an option in the "Filter" criteria.
Is this intentional or is it something that can be added?
Comment | File | Size | Author |
---|---|---|---|
#9 | 1871406-custom-submitted-data-filter-for-any-field.patch | 2.35 KB | andy_w |
#8 | Screen Shot 2015-09-22 at 13.49.26.png | 42.43 KB | Renee S |
#7 | Screen Shot 2015-09-22 at 13.48.00.png | 237.47 KB | Renee S |
Comments
Comment #1
swirtConfirmed. Webform data fields are not available for filtering or sorting within Views. It certainly makes things complicated.
As a workaround you could filter in the row section of the page tpl example in a custom tpl like this
views-view-table--webform-subs-guide--page.tpl.php (in this example the view is named 'webform-subs-guide')
Example, filtering for the word 'hello' :
Unfortunately this only works on a displayed view and not on an exported view into xls
Comment #2
quicksketchYou have to add a relationship for Webform Data first, then the filters and sorts become available.
Comment #3
swirtFantastic. Thank you for the leg-up. That worked wonderfully.
Comment #5
csimmons44 CreditAttribution: csimmons44 commentedHi, I've added the relationship for Webform submissions: data and selected the component I'd like to use as a filter (file upload field) but the Views filter only appears for the generic 'submission data' and only lets you choose a text filter to match on, not the normal range of Views filters. Is this working as designed? I see quite a few other similar questions around the interwebs, eg http://othermachines.com/blog/filter-form-submission-data-field-value-vi...
If not I'll look custom code or some other method to create a report. Basically I need to filter 10,000 submissions by a single field.
Thanks for any insight you can offer.
Comment #6
DanChadwick CreditAttribution: DanChadwick commentedThe only filter available for a file upload filter would be the fid. Yes, it's working as designed. You could filter on the presence of some uploaded file.
Also, I suggest you open new support requests for new issues. You can always reference this older issue.
Comment #7
Renee S CreditAttribution: Renee S commentedCSimmins44, check out the "Group filters" option, this allows you to create dropdown with labels and custom query values on the field. See attached screenshot.
Comment #8
Renee S CreditAttribution: Renee S commented(And here's what that created for me.)
Comment #9
andy_w CreditAttribution: andy_w at Numiko commentedWe had a requirement to be able to filter submission data in the CMS and added this filter, which allows string searching on any data in any submission, there are obviously a bunch of issues with this, and it would be far too non-performant to be used on the front end with a view.
Comment #10
yaach CreditAttribution: yaach commented#2 worked for me, thanks.
Comment #11
jaspm2004 CreditAttribution: jaspm2004 commented#2 worked for me too, thanks!