Closed (won't fix)
Project:
Webform
Version:
5.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2008 at 11:02 UTC
Updated:
5 Aug 2009 at 03:21 UTC
Has anyone had any thoughts on an import function for webform? I'm using webform for survey applications. In some cases the interviewers out on the field use their laptops for recording the answers during their person-to-person interviews. Since their internet access don't always work they use Excel instead. Not ideal. What I would want is
1) automatic creation of an Excel form mirroring the fields of the webform used
2) an import function that validates and then imports the Excel data back into webform format
Any advice before I start coding?
Petter
Comments
Comment #1
quicksketchPhew, this looks like it could be a really tedious task. Importing from a CSV file would be a really difficult feature both to implement and to actually use. Perhaps a better solution could be setting up local Drupal installs on the laptop (so they don't need internet) then writing a utility to dump the webform_results table into SQL and reimport into the main site?
Hmm. This just seems like a tough thing to do in general.
Another option: build a generalized module that can populate a form from a CSV file and run drupal_execute() on it. Then the final solution would work with any form in Drupal and not be tied to webform. It'd also be less likely to break as other code in Webform evolves. What do you think?
Comment #2
PWG commentedThanks for your input.
Using local Drupal installation would of course be cheating. ;) And in my case probably not the best solution because there are new interviewers for each survey...
The option of building a generalized module sounds very useful. Ideally it would also have an abort function so that if there's faulty data on say row 79, the user can decide to start over when he's fixed his data. And of course, if a validation rule gets broken, the user needs to be informed...
Petter
Comment #3
dhestlund commentedI think I'm looking for something similar - my boss plans conference sessions in excel and emails them around for approval/agreement, and I want a fairly straightforward way to get them into drupal and turn them into a view that more or less functions like the one implemented for drupalcon (after the public approval process). Maybe for next year I could develop a webform > online vetting > internal planning > public view workflow, but for now I just need to get the final data in quickly, hopefully without manual entry.
Comment #4
quicksketchI have no intention of implementing this in Webform, it'll have to come from a separate module. You can easily use webform_submission_insert() to insert new submissions, but parsing of CSV data is too finicky for me to implement as a stable feature of Webform.
Comment #5
vako commentedOK, how can we use the webform_submission_insert()? can you give us the syntax please or some samples.
thanks!
Comment #6
jeffschulerIt might be easier to change your Webform form into a custom content type, using CCK for custom fields.
Store all results as Nodes, and use Workflow and Rules to duplicate the parts of the process that Webform took care of. Use Views (and Charts) for results.
Then use Node import when you need to import from CSV.