Overview
This module provides a ctools content type plugin to display nodes that have webform components attached to them.
It also provides subtypes to allow you to specify the node type of the node you want to display, as well as the view mode you want to display it in, and it will only show nodes that actually 'are' webforms (have instanced webform components), instead of showing all nodes that 'can be' webforms (content types configured with webform enabled).
Background
This module was created in the scope a project I was working on where we basically developed a landing page builder using Panels and Panelizer.
The client was able to add predefined types of objects (beans, pages etc) but he had no way to explicitly add webforms (nodes with forms) to the panel. What makes it a bit confusing in terms of UX for clients sometimes is the fact that any kind of content can be a webform, so without this module if the client wanted to add a page with a form to the panel he would add a node and a list of literally hundreds of pages would be available.
Enter Webform Panels.
By providing a content type and subtype we can not only have easy access through the panels UI to add forms to a panel, but we can even limit certain roles to add only forms to the panel, while others would be able to add beans for example.
This made the builder much more powerful. Ever since then we have used this module everytime we need to work with Panels and define exactly what can be added to the Panel by the site manager.
See screenshot for an example.
There are no other modules that add this functionality, at least not to my knowledge. I actually created a similar sandbox called Webform Views filter, that allows users to filter nodes showing only the ones that have webforms, but though it maybe to small to submit as an application (https://www.drupal.org/sandbox/kyuubi/2180385)
Features
- Allows the user to select from only nodes that have actual webform components attached.
- Provides subtypes to allow the user to choose the node type of the webform he wants to display.
- Only displays subtypes for nodes that have webform components.
- Provides view mode support to specify the view mode in which the node is to be displayed.
- If you have Panelizer installed you can define access permissions for this content type only, allowing site managers to only add webforms to a panel for example.
Project Page
https://www.drupal.org/sandbox/kyuubi/2180399
Git Instructions
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/kyuubi/2180399.git webform_panels
Reviews of other projects
https://www.drupal.org/node/2390855#comment-9447981
https://www.drupal.org/node/2394329#comment-9448049
https://www.drupal.org/node/2394747#comment-9448085
Hope everything is in order!
Thanks,
Duarte
Comment | File | Size | Author |
---|---|---|---|
webform_panel.png | 74.85 KB | kyuubi |
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
kyuubi CreditAttribution: kyuubi commentedComment #3
kyuubi CreditAttribution: kyuubi commentedComment #4
zeeshan_khan CreditAttribution: zeeshan_khan commentedHi kyuubi,
I've tested your module on http://pareview.sh/pareview/httpgitdrupalorgsandboxkyuubi2180399git found no issue.
Then I've downloaded and installed the module and found no issue.
This module is working fine to me, I am changing status to reviewed.
Best,
Zeeshan
Comment #5
ameymudras CreditAttribution: ameymudras commentedHi kyuubi,
Please find my comments below to improve your module:
You can simply make use of
$query->execute()->fetchCol()
'#value' => $options ? key($options) : 'default',
Comment #6
kyuubi CreditAttribution: kyuubi commentedHey ameymudras,
Thanks for your feedback.
Will look into this as soon as I can.
Thanks for the help!
Comment #7
kyuubi CreditAttribution: kyuubi commentedHey ameymudras,
First thanks for your feedback, some of your tweaks were well spotted.
1. Didn't appy this as this becomes redundant once I modified the query to return the nids and use a fetchAllKeyed (already get a keyed array of nid->title, so no point)
2. Well spotted. I was using t() everywhere, must have missed this spot for some reason.
3. Done. This saved not only the foreach above but especially the node_load_multiple.
4. No need the node_load is already eliminated by doing 2.
Thanks mate for your effort.
Cheers,
Duarte
Comment #8
kyuubi CreditAttribution: kyuubi commentedComment #9
kyuubi CreditAttribution: kyuubi commentedComment #10
kyuubi CreditAttribution: kyuubi commentedComment #11
kyuubi CreditAttribution: kyuubi commentedAdding PAReview: review bonus tag.
Comment #12
klausiReview of the 7.x-1.x branch (commit 800ccf8):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
I'm setting this to "needs work" since I'm not sure if this is a security issue or not. Either fix the issue or add comments to the code explaining why node access is ignored.
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #13
kyuubi CreditAttribution: kyuubi commentedHi klausi,
Thanks first of all for your review you raise some definitely good issues.
1. Even though it does not seem a security issue to me (but I am really not qualified to confirm that) it makes total sense to manage leverage the access control capabilities by adding that tag. Fixed and also tested with content access module.
2. Here I think the title should be present for panel admin purposes. If a user has panel administration privileges (i.e the ability to restructure a node panel order) it makes sense they can see the title of the item even if he doesn't have access to it. Similarly to how several permission modules work, you can view a title administratively but when you click to view you get a access denied, except in this there isn't even anything to click, its just an title to make administration tasks easier.
3. Agree 100% with this one. Fixed and commented.
Thank you for your review!
Comment #14
tomz0r CreditAttribution: tomz0r commentedHi kyuubi,
I've tested your module on a fresh install.
Automated Review
No issues found.
http://pareview.sh/pareview/httpgitdrupalorgsandboxkyuubi2180399git-7x-1x-0
Manual Review
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Regards,
tomz0r
Comment #15
klausi@tomz0r: so it seems you did not find any problems with this project - could you set the status to RTBC in this case?
Comment #16
tomz0r CreditAttribution: tomz0r commentedSorry. Updated status to RTBC.
Thanks klausi.
Comment #17
kyuubi CreditAttribution: kyuubi commentedThanks for your review tomz0r!
Comment #18
kyuubi CreditAttribution: kyuubi commentedHi Klausi,
Is there anything else I need to do from my end?
How does the process go from RTBC?
Cheers,
Comment #19
kscheirerThanks for your contribution, kyuubi!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #20
kyuubi CreditAttribution: kyuubi commentedThanks kscheirer!
Will start by going through those readings and will definitely will help out on other applications.
Thanks to all reviewers that helped sharp the edges!
Comment #22
apaderno