Hi,
I have faced lots of problems with implementing Webforms submission with Views on Drupal7 and finally after working alot for the same i have found the solutions.
I want to share this solution with others may be this can be useful for some beginners.
Requirement is I have to Display the Submitted data for the Webform and data should be sorted from header and there should be edit link through which user can edit the corresponding submission.
Here is the steps:
Here is the steps to display and create view for the display of Submitted Data of Webform:
1. Install Webform Mysql Views module.
2. For Webform Mysql Views you need to install Data and Schema module.
3. After installations of above mentioned modules go to the
=> "content" menu
=> "webforms" tab
=> "Mysql Views" tab
4. Then you find a table which contains "Webform Name" and "View Name" for the webform nodes
5. Select the "Webform Name" for which you want to create view or display.
6. When you submit the form after selection, a table is created for the specific Webform Name which you have selected.
7. Suppose if you have selected 2 "Webform Name" 2 different tables for the webform submitted data is created, which contains the complete submissions for that particular webform node.
8. Then go to the "Structure" menu:
=> Select "Data tables" which is created from data module.
=> There you find 3 tabs:
a.) check if table name for the webform is available in "Overview" tab or not.
b.) open "Adopt tables" where you find "Orphaned Tables" listing.
c.) select the webform table for which you want to create display.
d.) Then press adopt submit button.
e.) after submission of form a table is display in "Overview" tab.
=> Then you have display the listing for the table you have selected above and operations for the same displays.
=> Click on "Edit" link, you are opened with "Edit Schema" for that table.
=> Now you get the listing of all the fields you have added in the webform.
=> There is "Primary Key" check box if you checked the box you get an error for base_field etc, so don't add the primary key.
=> But you have to add Joins for the same, you can add joins for multiple field.
=> Ex. you have first field sid and you want to add join for the same click "joins":
a.) Now you are opened with Join field which contains select box for the tables and there corresponding fields.
b.) Select the field Ex: - for sid from webform_submissions table sid.
c.) Add left join.
d.) Submit the form.
e.) Now you are joined with the webform_submissions table.
=> Then submit the form click on "Save".
9. Now create a new view for the webform:
=> Select type as "Webform submissions" and format is table.
=> Now by default you get (Submission Data) Ex: - (Submission Data) Webform views contact us 8: Sid (Sid).
=> Add Relationship for the view on Ex: - "Webform views contact us 8: Sid" from the available webform views name.
=> After adding Relationship you are available with the "Submission Data" for the corresponding Webform, you can add any field from that what ever is required.
=> To add edit link you can use default webform edit link field, which is used to edit the submission data for the corresponding submissions .
=> Add path whatever you required.
=> Finally save the view.
10. Now you are Available with the complete table with Headers, Submission data and edit operation.
11. For Sorting Through Headers:
=> Click Format Table Settings.
=> Check Sortable and add Default order.
12. Finally you get the Display for the Webform Submitted data with Sorting through Headers and Edit functionality.
Comments
Good Job!
Good Job Wattan this is very useful for me.
Be continue ...
Great
That was great and very helpful,
one doubt how do we show images when uploaded from webform.
though i tried but could not get. currently it is showing the file name ( a numeric no)
regards
hello
Do You find any solution related to your problem.
I am not getting the images which is uploaded by webform.
In views its showing the file no(Numeric value).
Please help me . and suggest.
Thanks in advance.
hi,not yet
hi,
not yet.
so what i did was use profile2 and make the registration for different profile
then created views. relate user details and profile 2 details
it worked. This i read some where i dont remember. but thanks to them
regards
How to link images from webforms
I did get images displaying through this somewhat lengthy process:
file_managed.fid
and left join. Save it.you can replace "thumbnail" with any image style you have created. See the docs for more on theme_image_style.
Hope that helps someone!
Thanks buddy
you save my lot of time.
good work, keep it up....
THANK YOU!
Wow THANK YOU!!! This has saved my week. Been fighting with the same modules.
Works for Drupal 6 too
Thanks - I did it... Thanks!
Thanks for sharing
Saved a lot of time.
[SOLVED] Error on Creating MySQL Views
Got error
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name 'webform_views_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx': CREATE OR REPLACE VIEW ...
Root cause: too long webform title.
Discovered that the database view was not created.
Though MySQL Views insisted that is there.
Could not remove MySQL Views entry either.
To fix the situation:
drush vget webform_mysql_views_views
This solved the issue for me.
This solved the issue for me. Thank you very much!
Problem...
I've done everything and was looking forward to a "beautiful view" but I continually get:
It looks like I have an orphaned view. I can't even uninstall Webform MySQL Views without hitting this error.
I've deleted .... cleared caches.... reinstalled.... nothing
Any suggestions?
Hello Jouflas, I have the
Hello Jouflas,
I have the exat same error. Have you found the solution by any chance ?
Got it up to this point:
=> There is "Primary Key" check box if you checked the box you get an error for base_field etc, so don't add the primary key.
=> But you have to add Joins for the same, you can add joins for multiple field.
=> Ex. you have first field sid and you want to add join for the same click "joins":
a.) Now you are opened with Join field which contains select box for the tables and there corresponding fields.
b.) Select the field Ex: - for sid from webform_submissions table sid.
c.) Add left join.
d.) Submit the form.
e.) Now you are joined with the webform_submissions table.
=> Then submit the form click on "Save".
I see the list in 'EDIT SCHEMA' but i'm not following what to do with the 'JOINS' part..
Examples of what I would like to see in the table view from the NAMES column on the EDIT SCHEMA tab: first_name, last_name, title, date
I do not know what to assign for the JOINS
you lost me...
Can someone help me with some specifics, p p please?
Not able to add Relationship
Hi,
I have created the view but not able to add relationship.
=> Add Relationship for the view on Ex: - "Webform views contact us 8: Sid" from the available webform views name.
Please help me...
Try to refresh cache
Hiraman, I had a similar problem, I couldn't add the relationship because they were not present in the relationship list in the view. This was solved refreshing the cache, after adding the joins.
There is also a video explaining the whole process (except the cleaning cache issue): Display Webform submission data in Views.
I have found several problems trying to achieve this, one of them was that Data/Views module integration does not work if your Drupal database is configured to use a table prefix, so after importing orphan tables, they were not included in the list. So what I did was to remove the prefix from the database tables, executing the php code found here in a php block.
displaying table data
this explanation is really good and works but i have a problem displaying table data from a webform. the data contains code, eg:
table with three rows should read:
1 One day at each of 6 (6 days @ £300/day) 1800.00
2 Two days at 1 @ £300/day 600.00
3 Exhibition Venue and set up costs 100.00
but looks like this:
Breakdown desc: a:4:{i:1;s:94:"One day at each of 6 (6 days @ £300/day)";i:2;s:103:"Two days at 1 @ £300/day";i:3;s:33:"Exhibition Venue and set up costs";i:4;N;}
Cost: a:4:{i:1;s:7:"1800.00";i:2;s:8:" 600.00";i:3;s:8:" 100.00";i:4;N;}
anyone got any ideas on displaying table data?
many thanks
There is now a 7.x-4.x branch
There is now a 7.x-4.x branch of webform that works with views without installing any additional modules. It might be worth checking out if that works for you. NOTE: You cannot revert to the previous version after you upload, so I highly suggest making a database dump.
GreatThanks alot, this is
Great
Thanks alot.
This is very useful for me, but there is small issue.
I have webform with two components the first one is Title and it textfield without validation, the second one is also textfield with url validation, when i created the view its get the right data but the url is not completed it always get the url column with 340 char only and trim the rest.
Thank you!
Thanks very much for taking the time to write this up. It really helped and saved me a lot of time. :)
Nice
This video worked for me.
web form submission view for admin
hi this work great for me , but the prob is if admin want to view form submission details of the user means.how can i provide that link.
for example in view they multiple user if admin click on paticular user link i want to show his form submission filled details
Webform MySQL Views low performance
Hello!
Webform 7.x-4.0-alpha9
I've tried Webform MySQL Views. But it has extremely low performance because data are not indexed in the generated table. Filtering or sorting takes some minutes! I spent a lot of time to find solution to fix it but nothing had found.
I've chosen another way...
Now adding fields to view I'm using standard "Webform submission data: Value". For filtering or sorting it is need to make relation to webform submission data choosing component. All works very fast.
Could you explain a bit more
Could you explain a bit more how you did this? I couldn't understand how you did!
Thanks in advanced!
Save lot's of time
Thanks dear. This post save my lot's of time. Good posting.............
I see that webform in under
I see that webform under the "ADOPT TABLES" but when I choose it and click on Adopt, i get the following message:
"Field main_webform_views_hitta_partner_anskan_1328.submitted: no Schema type for mysql type datetime."
Does any one know how to solve this problem?
Thanks in advanced!
@linuxor, do you have
@linuxor, do you have prefixes on your MySQL table names? If so, remove the table prefixes and modify your settings.php and set 'prefix' => '' in the $databases array settings. Also, flush your caches.
There is a php script and directions here to remove the table prefixes.
ReggieW
prefix is set to '' by
prefix is set to '' by default but I'm still getting an error and now I also cant drop the table. Any ideas?
Clean up faulty Webform Mysql Views in the database.
Great time saving post, thank you!
I encountered that for some Webforms under
=> "content" menu
=> "webforms" tab
=> "Mysql Views" tab
some of the forms where already selected while no SQL vieww were created. Due to this it was not possible to de-select the forms (error encountered).
What i did to solve this:
- go to phpMyAdmin and find the proper database (and make a backup to be save)
- goto to the table "variable"
- find the 2 rows:
webform_mysql_views_meets_reqs
webform_mysql_views_views
- remove (SQL) views like "webform_views_*" that are not in use or checked
- clear the cache
Now it worked for me. I hope it helps others with the same problem.
Hi
Really good! works for me.
How to fetch file uploads
Thankx alot for the info.
I need to display file uploads form webform to views page.
schema error
i get the following error while trying to adopt table:
User warning: webform_views_testemonial.submitted: no schema type for mysql type datetime. in schema_schema_type() (line 384 of /home2/sagigree/public_html/sites/all/modules/schema/schema.module).
any help will be appriciated
Sagi Green
VP Biz Dev
Crazy Designs
info@crazydesigns.biz
www.crazydesigns.biz
same here
I got the same error
Solution for Webform 3
Webform 4 supports this natively, but for those still using Webform 3 - https://drupal.org/node/1219954#comment-8589477
The zip in #16 work well for me (at the time of writing).
Great work
Awesome post, working great for me.
Just one thing, need to display "file Field" in views page. Thank you so much.
Amazing. You did a great job.
Amazing. You did a great job. Of course the extension builder as well ;)
Kinda lost
I having trouble following what you're saying here. Some clarification would be greatly appreciated.
This made sense. No problem.
This is where I got lost. Where do I "get" this? Where does "(Submission Data)" appear?
Totally lost on what this is trying to say.
When I click "Add Relationship" I get the following options. Which do I choose?
Content: Author
Content: Taxonomy terms on node
Content: Webform submission
Entity Reference: Referencing entity
Webform submissions: Node
Webform submissions: User
Never mind. It was confusion
Never mind. It was confusion with the Joins like jojojibba said before. Here's what I did:
In the "Edit Schema" screen that lists all of the fields, I clicked "none" for sid (the last column of the first line)
On the following page, I selected "webform_submitted_data.sid" and "Left Join" and Saved it
Now, back at the Views page...
First, make sure that in Fields, the "sid" field is removed. It wasn't added properly by default.
Under Relationships, I clicked "Add" and selected "Webform views [MY FORM NAME]: Sid" and clicked the Add button
NOW, under Fields, I have all of the fields from the webform available
One view for all Submission data?
Hi,
I am building a website that allows users to setup their own webforms.
Does anyone know how to apply this process so one view can display the submission data for any webform?
I dont really want to do this each time someone adds a new form.
9. No webform submission
Dear,
When I create a new view, I don't see webform submission to select. What is the problem. could you guide me.
Thank for you help.
Well, this is very long
Well, this is very long process. But if you are running latest Views and Webform module on Drupal 7 you can do it in just 4 to 5 steps and that too very easily without even installing any extra module.
Just create a new view by selecting webform submissions data and rendered submissions instead of fields under Display format.
Or follow the process from this : - how-display-webform-submissions-views-drupal-7
Getting problem in join with multiple selection of value
Thanks to you to post such detail creation of views for webform submission. I tried it and working for me but in join my webform submission column value is multiple and it is 1,2,3 and can't be related it with each taxonomy term tid coz join will be work with one to one value relation with exact match ? if i am wrong can any one please suggest the solution for this.
Drupal Development Company
The website encountered an unexpected error
Error messagePDOException: SQLSTATE[HY000]: General error: 1347 'dbdemo.webform_views_feedback' is not BASE TABLE: ALTER TABLE {webform_views_feedback} CHANGE `submitted` `submitted` INT NULL DEFAULT NULL; Array ( ) in db_change_field() (line 3020 of D:\xampp\htdocs\DBDemo\includes\database\database.inc).
The website encountered an unexpected error. Please try again later.
I got that error. It wont help me. Any suggestion would be appriciated.
Field type = select options - display readable option instead
However, when I add a webform field (where field type = select options), the result on the views table displays the safe_key (1, 2, 3, etc.) instead of the human readable option. How can I rewrite the results to display the readable value as opposed to the machine key?
Did you ever find the answer?
I am scouring the web looking for the answer to your exact question. Did you ever figure it out?