Skip to content

Instantly share code, notes, and snippets.

@willtonkin
Created January 24, 2014 21:20
Show Gist options
  • Save willtonkin/8606721 to your computer and use it in GitHub Desktop.
Save willtonkin/8606721 to your computer and use it in GitHub Desktop.
ExpressionEngine template that creates a CSV file from FreeForm data.
"First Name","Email"
{exp:freeform:entries
form_name="contact"
orderby="entry_date"
sort="asc"
limit="9999"
}"{freeform:field:first_name}","{freeform:field:email}"
{/exp:freeform:entries}
<?php
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=contact-list.csv");
header("Pragma: no-cache");
header("Expires: 0");
exit(0);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment