Closed (fixed)
Project:
Webform
Version:
5.x-1.7
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2007 at 22:00 UTC
Updated:
4 Apr 2008 at 21:32 UTC
I do not understand how webform exports the data... I create a form with items in a certain order -weight , within fieldsets, etc... but when I have input and view the results in analysis, table, or as an exported cvs, the data is not kept in the order I created the webform; so it makes no sense for human readability. Is this a feature i am missunderstanding? Is there a way to get results in the order i created the items? Thank you
Comments
Comment #1
quicksketchYes I think this is still a problem in 1.3. The analysis and table views seem to be reasonably ordered, but the CSV doesn't seem to make any sense.
Comment #2
GTAce commentedTable and download (export) are sorted by submission, which kind of makes sense...but the analysis results is what I think is really strange...It is first sorted by question and then alphabetically (completely ignores the weights). Does anybody know how to sort those results by weight instead of name?
Comment #3
roginald commentedI noticed this problem as well on a couple of my forms. What I found my problem to be was, that I thought I was being clever by taking advantage of using weights inside of fieldsets and thinking that I could only be concerned with a fields 'local' weight. This is certainly the case for viewing a webform, however not the case when viewing the table or downloading to csv.
In short, I was able to fix the problem by making sure to use only 1 set of weights, making sure that the order I wanted the fields to be exported was reflected in the weights. This resulted in some rather large weight numbers, but at least it works.
Comment #4
quicksketchClever solution roginald. I'll try to fix this when time allows so you won't have to jump through such hoops. Thanks for sharing though!
Comment #5
vipconsult commented.
Comment #6
mandclu commentedJust subscribing to this thread, as this appears to still be an issue.
Comment #7
jpsalter commentedI missed this issue and posted this as a feature request. I got the sorting needed with a simple fix (slightly hackish).
http://drupal.org/node/207766
Comment #8
mandclu commentedConfirmed, that solves the issue for me too. Thanks!
Comment #9
quicksketchThis patch actually was the one that got in: http://drupal.org/node/190193
Comment #10
mandclu commentedAre you sure these issues are duplicates? The one you refer to seems to be related to order problems derived from how select lists are handled, whereas this is more to do with ordering problems that derive from how fieldsets are handled. In my mind, both are issues that need to be fixed.
Comment #11
Firetracker commentedHi,
I'm having this problem with both 5.x-1.7 and 5.x-1.8.
Both Table and CSV do not seem display in any order or follow the layout of the page.
Help!
Cheers
Zapple
Comment #12
quicksketchThanks for reopening. The problem definitely still existed. I had a hand at this (and several other issues on the plane) and committed it all to CVS. Unfortunately I don't have a patch for the fix as it was bundled with several others. If you could try out the latest dev version or try it out from CVS I'd appreciate confirmation the problem has been solved. Thanks!
Comment #13
Firetracker commentedHi Quicksketch,
If you are wanting to list by weight only and are listing EVERY item in order, then the following code works:
However this doesn't work with Nested weights (in fieldsets) which is what I had originally. I've not tested your dev version with Nested weights because there seems to be a bug with the weights on main edit page of the form.
If I try to update a weight or make a field mandatory in the edit page, then submit the page to update it, none of the values are submitted. This is not the case when editing a component directly which work fine.
Cheers
Zap
Comment #14
quicksketchYeah after researching a bit, there isn't an easy way to do nested structures in SQL unless you've got stored procedures at your disposal. Taxonomy module does it by repeated SQL queries for each level of the tree. But rather than doing it in SQL at all, I left it pulling normally all at once then using the existing webform sorting functions to turn it into a tree. Once it's a tree I flatten it again maintaining the same correct order.
Could you elaborate what this problem is in the dev version?
Comment #15
quicksketchMarked http://drupal.org/node/180236 as duplicate.
Comment #16
Firetracker commentedHI Quicksketch,
Thanks for the quick repsonse!
If I change the weight or tick a mandatory field option in the main node/*/edit form, then hit submit nothing gets updated.
I'm taking a guess here but...if you edit these in the component they are pushed to memory then only stored when the node is updated. However on the actual node form they need to inserted directly upon hitting the submit.
Cheers
Zap
Comment #17
quicksketchHey zapple, I'm fairly sure I corrected that problem in the dev version, though it is definitely an issue in 1.8. Regardless, could you try out the dev version to see if form ordering is corrected? If the checkbox issue still exists, please open a separate ticket. Thanks!
Comment #18
Firetracker commentedHi Quicksketch,
Just to let you know that the weights & mandatory fields on the main edit page are working fine in the Dev build from 24th January.
Cheers for all your help.
Zap
Comment #19
quicksketchRock, closing out.
Comment #20
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.