diff --git a/go-form-plugin/export/csv.php b/go-form-plugin/export/csv.php index 5163b1c..864c4b9 100644 --- a/go-form-plugin/export/csv.php +++ b/go-form-plugin/export/csv.php @@ -18,16 +18,16 @@ header('Content-Disposition: attachment; filename="go-form-' . sanitize_title($f $output = fopen('php://output', 'w'); // Build header row -$header = ['ID', 'First Name', 'Last Name', 'Country', 'Club', 'Rank', 'Rating', 'EGD Number', 'Date Added']; +$header = ['N', 'First Name', 'Last Name', 'Country', 'Club', 'Rank', 'Rating', 'EGD Number', 'Date Added']; foreach ($custom_fields as $field) { $header[] = $field->field_name; } fputcsv($output, $header); -foreach ($entries as $e) { +foreach ($entries as $i => $e) { global $ranks; $row = [ - $e->id, + $i, $e->first_name, $e->last_name, $e->country, diff --git a/go-form-plugin/templates/table.php b/go-form-plugin/templates/table.php index 36b839a..20c1ba8 100644 --- a/go-form-plugin/templates/table.php +++ b/go-form-plugin/templates/table.php @@ -1,6 +1,7 @@
| N | First Name | Last Name | Country | @@ -24,9 +25,10 @@
|---|---|---|---|
| = $i + 1 ?> | = esc_html($e->first_name) ?> | = esc_html($e->last_name) ?> | = esc_html($e->country) ?> |