Hey,

I noticed that when the webform has fieldsets, the excel sheet doesn't take them into account so the order of the fields in the excel sheet may be much different than the displayed form because the query on your webform_load() doesn't take the fieldsets into account.

This is a one liner patch, I've altered the query and it's working on my side, same result set, right order even when generating the excel sheet. The query is a tad bit more complex though. This may positively reflect on other parts of the module as well (default option button when editing a webform seems to be fixed as well), but I'm not sure if it could have any negative effects.

Check it out :)

CommentFileSizeAuthor
patch_9.diff823 bytesAshraf Amayreh

Comments

HorsePunchKid’s picture

I'm not sure what the status of Postgres support is for this module, but this patch introduces a tiny problem: the double-quotes at "fieldset" are not valid SQL. All that needs to happen is swapping the single- and double-quotes on that line.

That said, this patch causes my form to not render--presumably the query returns no results--so it probably needs a little more work. :)

quicksketch’s picture

Status: Needs review » Needs work

Yeah it's true the CSV doesn't take into account fieldset ordering yet. The query is also a bit off in that it's missing the brackets {} around table names. This breaks Drupal installations that were installed with table prefixes. I'm a bit busy to extensively test the patch, so I'll count on user tests to mark this RTBC. For now though, it needs some work.

quicksketch’s picture

This problem has been addressed in http://drupal.org/node/146927.

quicksketch’s picture

Status: Needs work » Closed (duplicate)