JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: fix csv download header row
authorJason Woofenden <jason@jasonwoof.com>
Tue, 28 Aug 2012 13:56:26 +0000 (09:56 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Tue, 28 Aug 2012 13:56:26 +0000 (09:56 -0400)
metaform/main.html
metaform/template.php

index 781dea1..c0057c2 100644 (file)
@@ -3,6 +3,7 @@
 <html>
 <head>
   <title>Meta Form</title>
+  <style>input[type=text], textarea { width: 400px; }</style>
 </head>
 
 <body>
index 0f3acf8..e233f36 100644 (file)
@@ -149,7 +149,7 @@ function ~file_name~_main_delete($id) {
 function ~file_name~_csv_download() {
        require_once('code/wfpl/csv.php');
        $rows = db_get_rows('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'order by id');
-       array_unshift($rows, explode(',',~file_name upper~_DB_FIELDS));
+       array_unshift($rows, explode(',', 'id,'.~file_name upper~_DB_FIELDS));
        array2d_to_csv_download($rows, '~file_name~.csv');
 }