2 * create a custom table for the form
4 * This table NEEDS a UNIQUE name
7 CREATE TABLE IF NOT EXISTS `form_example` (
8 /* these fields are common to all forms and should remain intact */
9 id bigint(20) NOT NULL auto_increment,
10 date datetime default NULL,
11 pid bigint(20) default NULL,
12 user varchar(255) default NULL,
13 groupname varchar(255) default NULL,
14 authorized tinyint(4) default NULL,
15 activity tinyint(4) default NULL,
17 /* these fields are customized to this form */
18 form_date datetime default NULL, /* date the form was completed by client */
19 name varchar(255), /* full name on the form */
20 dob datetime default NULL, /* date of birth */
21 phone varchar(15), /* phone number */
22 address varchar(255), /* home address */
23 notes longtext, /* free-text notes */
24 sig char(1), /* Did client sign the paper version of the form? */
25 sig_date datetime default NULL, /* Date the client signed the form */
26 /* end of custom form fields */