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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

header field names in csv export dont match form field name


Go to End


3 Posts   2372 Views

Avatar
Anonymous user

Community Member, 8 Posts

26 May 2011 at 2:02pm

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

Forum Moderator, 5523 Posts

26 May 2011 at 7:55pm

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

Community Member, 8 Posts

28 May 2011 at 7:59pm

Hi Willr

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

Cheers
Pete