Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » header field names in csv export dont match form field name

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

Page: 1
Go to End
Author Topic: 800 Views
  • Anonymous user
    Avatar
    Community Member
    8 Posts

    header field names in csv export dont match form field name Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: header field names in csv export dont match form field name Link to this post

    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.

  • Anonymous user
    Avatar
    Community Member
    8 Posts

    Re: header field names in csv export dont match form field name Link to this post

    Hi Willr

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

    Cheers
    Pete

    800 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.