Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions

header field names in csv export dont match form field name


Reply

3 Posts   811 Views

Avatar
Anonymous user

26 May 2011 at 2:02pm Community Member, 8 Posts

Hi

I have this strange problem with the userforms module.

I have a simple form with the following fields:
First and Last Name
Address
City/Town
Email address
Check box

Submit button

The display of form submissions is correct but when the submissions are exported via csv the header row in the csv file is somewhat doubled up

Here is what it looks like:
"First name and Last name","Street address","Email address","I agree to have my name published on the CT website","First name and Last name (required)","Street address (optional)","City/Town (required)","Email address (required)","I agree to have my name published on the CloserTogether.org.nz website.","Submitted"

Note the duplication of the field names "First and last name" though to "I agree to have..."
The data records are mostly OK except for a blank field before the submission date and time field . e.g. my own record looks like this:
"Pete Cowley","2/56 Ira Street","pcowley@paradise.net.nz","Yes","","2011-04-09 22:36:11"

I'm on Silverstripe version 2.4.4
I've done a rebuild (not that I expected it to make any difference) and a flush=1

Anyone have any ideas what is causng this?

Cheers
Pete

Avatar
Willr

26 May 2011 at 7:55pm Forum Moderator, 5511 Posts

One thing that could be causing that is the fact that when you update the form it'll keep any old submitted column title names in the export. So perhaps if you have renamed a field previously it'll keep the submitted column title.

To clear it up you can delete all the submissions from the form and then it should clean up the duplicate comments.

Avatar
Anonymous user

28 May 2011 at 7:59pm Community Member, 8 Posts

Hi Willr

Thanks for that. You were right, when the submissions were deleted the problem went away.

Cheers
Pete