I have the Webform Mysql Views, Data, and Schema modules installed on my site. I want to make the data of one or more specific webform submission to be displayed by the views module. In other words, I want to import the submission data into the views so that it can display the data as a page and block in the way as it display specific nodes depending the argument.

Can anyone tell me how to do it? Thanks in advance!

Comments

joecorall’s picture

Hello,

Webform now has native views support, see http://drupal.org/node/680386

The scope of the 7.x version of this module will only be to create MySQL Views of Webform submissions, not providing a way to feed the submissions into Drupal's Views.

Unfortunately, I don't think there is documentation anywhere to detail how to create a View using Webform's native support. I'm assuming it's similar to creating Views for nodes; but can't say for sure, as I've never used it.

Are you familiar with creating Drupal Views for nodes or other entities?

cafuego’s picture

I've got a bunch of this working for Views 2 and 3 in the 6.x-2.x module. Unless you object, why don't I check how hard it is to port that to 7.x. Could be a nice target for a 7.x-2.x.

joecorall’s picture

You can go right ahead, if you'd like. I'd be more than willing to help with that, too.

However, it really seems like duplicate effort to me. I'd think if we're able to invest that amount of time, it'd probably be better suited to aid the Webform module with their Views integration issues, since they're so close to having it implemented. From what I gather, it's already pretty much working on the dev version.

What do you think?

cafuego’s picture

I had a play with theirs and it looks as if it works fine. However, I wouldn't be looking forward to redoing all the views with a rather large number of fields that I've set up for clients. For my own enlightened self-interest, I'd prefer to be able to simply install a 7.x version of Webform MySQL Views and upgrade the site with no fuss :-)

DrupalDan’s picture

Hi Joe, thanks for your response. I read the issue you posted. But I'm just seeking some module that allows me to show individual submission.

Yes, I guess I'm "familiar" with creating Views for nodes. This might sound silly, but after I installed this module, I immediately went to add a view, and hoped to find something new under Filter criteria that might accomplish the display of a specific webform submission result but with no luck, so I added an issue here.

Sorry but I'm also a little confusing, I mean, does this module create any additional display of any webform submission result? If so can you tell me where I can find it? Using the webform module itself I can view the result of each webform submission by admin/content/webforms and then submissions/view. And after I checked the form and click Submit at admin/content/webform/mysql, I didn't see anything particular to show up (I could be wrong):)

DrupalDan’s picture

Hi cafuego, what module do you refer to? Do you mean it is possible to accomplish the effect I expected in the future?

cafuego’s picture

@DrupDan If you patch webform with the patch attached to #680386: Views integration for the webform_submitted_data table (comment 143, I think) you can do what you want. There's no support in any release version as yet.

DrupalDan’s picture

Hi cafuego, thank you very much for your information. I was trying to do the patching, but I'm kind of new to this kind of things and I think I run a little problem with that.

Well, I downloaded the patch and put it under C:\wamp\www\sites\all\modules\webform

Then I moved the directory to the webform module by entering cd c:/wamp/www/sites/all/modules/webform
and entered the command I copied from the webform vision control:
git clone --recursive --branch 7.x-3.x http://git.drupal.org/project/webform.git

and then I entered
cd webform

The last thing I do was to enter: git apply -v webform_views_submitted_data-680386-143.patch

But then I got: fatal: can't open patch 'webform_views_submitted_data-680386-143.patch' : No such file or directory.

I enter ls and the patch is not there, so I copied to c:/wamp/www/sites/all/modules/webform/webform and did the git apply again, and then I got:

fatal: git diff header lacks filename information when removing 1 leading pathname components.

I don't know if I did something wrong. I'd appreciate it if you could give me a hand on this. Thank you in advance.

joecorall’s picture

@DrupalDan

I was getting the same errors you were when trying to apply the patch found at comment #145 in the webform view thread linked above. There's a new patch here. This one should apply cleanly on the 7.x-3.x branch

DrupalDan’s picture

Thank you very much Joe for your message. Yes, I just realized the two newly available patches. And I use the the 164 one, which does apply cleanly. And I'm going to jump straight to see what change this brings.

Thanks again for your kind head-up.

joecorall’s picture

Status: Active » Closed (won't fix)
Patricia_W’s picture

I was advised that this issue is a duplicate of an issue I opened regarding being unable to create a Webform MySQL view in D7. I have applied the patch and uploaded it to my site and attempted to create a view from a webform. As I reported in my issue, when I create a view from a webform, it states that the view has been created but when I look at the list of views it is not there. Is there an intermediate step I am missing?

joecorall’s picture

When your site displays the message "a view has been created" - that message means a MySQL View has been created, not a Drupal View.

You'll need to use Webform's Views functionality if you want your Webforms exposed to Drupal Views. If you aren't using MySQL Views for your webforms, you don't need this module.

Patricia_W’s picture

In Drupal 6 I had a similar webform. When I created the view I was able to create a block of submission data which I included in a regular page. I would like to do the same with Drupal 7. In Drupal 6 I recollect that when I created the Webform MySQL view I could access it from the Views module. Where else should it be? What do you mean when you say a MySQL View? How can I use it?