Needs review
Project:
Webform Report
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2011 at 08:22 UTC
Updated:
25 Apr 2011 at 22:39 UTC
I think the types of content are embedded webform, but not in use (have not added any field) should not appear in the list of options when creating a report.
Example:
I have attached type "webform" to type "page" I have about 100 pages so the list is too long when in fact only 4 or 5 has a "webform" being used.
On the other hand I would like to propose that instead of a selectable text field was in the writing of the title that shows you the webform that exist with that name.
This modification make filter list:
Line 22 webform_repor.inc
<?php
- $result = db_query(db_rewrite_sql("SELECT n.nid, n.title,n.uid FROM {node} n WHERE n.type in ($placeholders)"), $webform_types);
+ $result = db_query(db_rewrite_sql("SELECT n.nid, n.title,n.uid FROM {node} n left join {webform} w ON w.nid=n.nid WHERE w.nid is not null and n.type in ($placeholders)"), $webform_types);
?>
I hope your opinion, Regards!
Comments
Comment #1
jimbullington commentedThank you for the patch - it works for me, but I would like for others to try it as well.
Anyone?
Comment #2
roderikSeems entirely logical (and in line with the design of webform 3, to be able to attach webforms to content types).