summaryrefslogtreecommitdiffstats
path: root/app/class/form.class.php
diff options
context:
space:
mode:
authorM <m@lfurio.us>2015-12-03 22:11:13 -0500
committerM <m@lfurio.us>2015-12-03 22:11:13 -0500
commit49e6128951e8d8b340ea6027735c8b3566c44b6b (patch)
treef09c34c1ee5475ca11712eb5d1b4b77986b12dcb /app/class/form.class.php
parentdfd10529bb00ed344cb118219abab98cb1769760 (diff)
downloadscrott-49e6128951e8d8b340ea6027735c8b3566c44b6b.tar.gz
scrott-49e6128951e8d8b340ea6027735c8b3566c44b6b.zip
+ Started Form class definition
Diffstat (limited to 'app/class/form.class.php')
-rw-r--r--app/class/form.class.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/class/form.class.php b/app/class/form.class.php
new file mode 100644
index 0000000..e398690
--- /dev/null
+++ b/app/class/form.class.php
@@ -0,0 +1,35 @@
+<?php
+
+/*
+ * Model web-forms and simplify the process of accepting, validating, and sanitizing input
+ */
+class Form
+{
+ /*
+ * Constructor
+ */
+ function __construct()
+ {
+ $this->textFields = array();
+
+ $this->errorlist = array();
+ $this->warninglist = array();
+ $this->noticelist = array();
+ }
+
+ /*
+ * Add new text field to the form
+ */
+ function field_text($name, $req = true)
+ {
+ if ($req !== true)
+ $req = false;
+
+ $this->textFields[] = array(
+ 'name' => $name,
+ 'req' => $req
+ );
+ }
+}
+
+?>