Posted: December 3, 2013 at 10:10 am
|
I replied to this article by accident thinking I was on the support forum. https://eventespresso.com/2011/05/drag-and-drop-question-order-sequence We have chosen the order we wish the questions to appear described in the article above using the drag and drop feature however the spreadsheet export of event attendees appears in a different order. Is it possible to reorder the way the fields are exported? This is because the spreadsheet needs to be imported into another system. Thanks Alex |
|
I think this line (361 in includes/functions/export.php): $quest_sql .= " ORDER BY q.sequence, q.id ASC "; should be: $quest_sql .= " ORDER BY qg.group_order, q.sequence ASC "; This should order them by the group order first, then by the question sequence. The first three questions are hard coded in. |
|
Do you mean it will always start with First name, Last name and Email? I have edited the export.php file and it is still not in the desired order. Thanks Alex |
|
Correct. The header for the first name, last name, and email are set on lines 307-309, and the output is on lines 531-533. You could try commenting out those lines, and changing the ignore array on line 364 to an empty array: $ignore = array(); |
|
Thanks that worked, I got it almost perfect now. The last thing I am trying to do is make it so the output contains none of the other fields before the questions. I have managed to remove them all except the first one “Group”. When I delete the line Thanks Alex |
|
The code that echoes the answers assumes there are columns before the answers, so it outputs a separator, then the answer. So you could use php’s output buffer to capture each line of output, then trim off the first separator. |
|
That’s a bit beyond by PHP knowledge, I had a look through the code but couldn’t work out what was going on. Would you possibly be able to tell me which line needs changing? Thanks Alex |
|
You would want to start the output buffer before line 545: ob_start(); foreach ($question_list as $k => $v) { and then end the buffer after the corresponding closing brace on line 559: } $line = ob_get_clean(); echo substr($line, strlen($s)); that last line should strip the first separator off the line and echo it. |
|
Thank you very much for your help. |
The support post ‘Reordering the export of event attendees’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.