JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform itself (not generated code) <label> checkboxes
[wfpl.git] / metaform / main.html
index 64c09d4..f6202e4 100644 (file)
@@ -1,24 +1,64 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html>
 
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
 <head>
   <title>Meta Form</title>
+  <style>input[type=text], textarea { width: 400px; }</style>
 </head>
 
 <body>
-  <form action="metaform.php" method="get">
-    <p>Form name: <input type="text" name="form_name" value="~form_name~" /></p>
+  <h1>Meta Form</h1>
+  <p>This site will write code for you (sql code, php code, html template, email template) to handle a form.</p>
+  <form action="~metaform_name~" method="get">
+    <p>The form name should not contain any capitals or symbols (besides underscore)</p>
 
-    <p>Fields: 
-    <textarea name="fields">~fields.html~</textarea></p>
+    <p>File name: <input type="text" name="file_name" value="~public_file_name attr~" autofocus>.html</p>
+
+    <p>DB table: <input type="text" name="table_name" value="~table_name attr~"></p>
+
+    <p>Printable singular: <input type="text" name="singular" value="~singular attr~"></p>
+
+    <p>Printable plural: <input type="text" name="plural" value="~plural attr~"></p>
+
+
+       <h3>Features</h3>
+
+    <p><input type="checkbox" name="opt_email~opt_email checked~" id="opt_email" value="Yes"> <label for="opt_email">Send form results vie e-mail.</label></p>
 
-    <p><input type="submit" name="download_sql" value="Download SQL" /></p>
+    <p><input type="checkbox" name="opt_db~opt_db checked~" id="opt_db" value="Yes"> <label for="opt_db">Save form results to a database.</label></p>
 
-    <p><input type="submit" name="download_php" value="Download PHP" /></p>
+    <p><input type="checkbox" name="opt_listing~opt_listing checked~" id="opt_listing" value="Yes"> <label for="opt_listing">Provide a "Listing" page.</label></p>
 
-    <p><input type="submit" name="download_template" value="Download template" /></p>
+    <p><input type="checkbox" name="opt_display~opt_display checked~" id="opt_display" value="Yes"> <label for="opt_display">Provide a "Display" page.</label></p>
+
+    <p><input type="checkbox" name="opt_pass~opt_pass checked~" id="opt_pass" value="Yes"> <label for="opt_pass">Password protect this page.</label><br>
+       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="opt_public_form~opt_public_form checked~" id="opt_public_form" value="Yes"> <label for="opt_public_form">But with publicly accessible submission form</label><br>
+       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="opt_public_display~opt_public_display checked~" id="opt_public_display" value="Yes"> <label for="opt_public_display">But with publicly accessible view page.</label></p>
+
+       <p>Below, specify the fields you'd like in your form, one field per line. You can (optional) add a field type at the beginning of the line. The following field types are available: <!--~types {~--><!--~types_sep {~-->, <!--~}~-->~type html~<!--~}~-->.</p>
+
+       <p>You can start a labeled fieldset by putting a <code>{</code> at the end of a line with the caption. Then end the fieldset with a <code>}</code> on a line by itself</p>
+
+       <p>Pulldown/radio options can be specified (one per line) indented below the field</p>
+
+       <p>Example:<br><code><pre>
+email
+contact info (all required) {
+name
+phone
+}
+pulldown color
+       Red
+       Blue
+       Black
+textarea comments
+yesno agree
+</pre></code></p>
+
+    <p>Fields: 
+    <textarea rows="10" cols="40" name="fields">~fields html~</textarea></p>
 
-    <p><input type="submit" name="download_email" value="Download e-mail" /></p>
+    <p><input type="submit" name="preview" value="Continue"></p>
   </form>
 </body>
 </html>