Update forms
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 3 Mar 2015 01:33:17 +0000 (20:33 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 3 Mar 2015 01:33:17 +0000 (20:33 -0500)
Adding form for the Vacation Planner.
Bring in the config ini file used for options.

Toolkit/Contacts/GolfGiveaway.php
Toolkit/Contacts/VacationPlanner.php [new file with mode: 0644]
Toolkit/Contacts/VisitorGuide.php [deleted file]
Toolkit/Contacts/cdb-form.ini [new file with mode: 0644]
Toolkit/Contacts/config.ini
static/3.phtml [new file with mode: 0644]

index 2886e7d..75b5dc8 100755 (executable)
@@ -129,7 +129,16 @@ class Toolkit_Contacts_GolfGiveaway
      */
     public function configureElements()
     {
-        $e = array();
+        $e          = array();
+        $config     = parse_ini_file('config.ini', true);
+        $referredBy = $config['referred_by'];
+        $gender     = $config['gender'];
+        $age        = $config['age'];
+        $handicap   = $config['handicap'];
+        $howMany    = $config['how_many'];
+        $grpHowMany = $config['group_how_many'];
+        $roundYear  = $config['round_year'];
+
         if ($this->hasContactDB) {
             $this->setInterestFields();
             //    Grouped Elements are defined here.
@@ -231,25 +240,14 @@ class Toolkit_Contacts_GolfGiveaway
             'req'     => false,
             'name'    => 'gender',
             'display' => 'Gender',
-            'opts'    => array(
-                ''       => '',
-                'Male'   => 'Male',
-                'Female' => 'Female'
-            )
+            'opts'    => $gender
         );
         $e[] = array(
             'type'    => 'select',
             'req'     => false,
             'name'    => 'age',
             'display' => 'Age',
-            'opts'    => array(
-                ''       => '',
-                '18-25' => '18-25',
-                '26-34' => '26-34',
-                '35-44' => '35-44',
-                '45-55' => '45-55',
-                'OVER 55' => 'OVER 55'
-            )
+            'opts'    => $age
         );
         $e[] = array(
             'type'    => 'static',
@@ -272,8 +270,6 @@ class Toolkit_Contacts_GolfGiveaway
             'opts'    => 'Yes, Register me to WIN the Gaylord Golf Giveaway!',
             'val'     => array(0, 1)
         );
-
-
         $e[] = array(
             'type'    => 'advcheckbox',
             'req'     => false,
@@ -297,59 +293,26 @@ class Toolkit_Contacts_GolfGiveaway
             'display' => 'Comments or Questions'
         );
 
-        $e[]            = array(
-            'type'                  => 'select',
-            'req'                   => false,
-            'name'                  => 'referred_by',
-            'display'               => 'How did you hear about the Gaylord Area?',
-            'opts'                  => array(
-                ''                      => '',
-                'golf_shows'            => 'Golf Shows',
-                'michigan_travel_ideas' => 'Michigan Travel Ideas',
-                'michigan_golf'         => 'Michigan Golf',
-                'golfing_in_mich'       => 'Golfing in Michigan',
-                'aaa_living'            => 'AAA Living',
-                'ohio_golf_living'      => 'Ohio-Golf Living',
-                'newspaper'             => 'Newspaper',
-                'radio'                 => 'Radio',
-                'postcard_mailing'      => 'Postcard Mailing',
-                'travel_planner'        => 'Travel Planner',
-                'search_engine'         => 'Search Engine',
-                'michigan_living'       => 'Michigan Living',
-                'fairways_golf_travel'  => 'Fairways Golf Travel',
-                'referred_by_friend'    => 'Referred by Friend',
-                'ohio_golf_pub'         => 'Ohio Golf Publication',
-                'great_lakes_golf'      => 'Great Lakes Golf',
-                'score_golf'            => 'SCORE Golf',
-                'golf_mag'              => 'Golf Magazine',
-                'miles_of_golf'         => 'Miles of Golf'
-            )
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'referred_by',
+            'display' => 'How did you hear about the Gaylord Area?',
+            'opts'    => $referredBy
         );
         $e[] = array(
             'type'    => 'select',
             'req'     => false,
             'name'    => 'how_many',
             'display' => 'How many golf vacations do you take per year?',
-            'opts'    => array(
-                ''          => '',
-                '1'         => '1',
-                '2'         => '2',
-                '3-5'       => '3-5',
-                '6 or more' => '6 or more'
-            )
+            'opts'    => $howMany
         );
         $e[] = array(
             'type'    => 'select',
             'req'     => false,
             'name'    => 'handicap',
             'display' => 'Do you have a USGA Handicap',
-            'opts'    => array(
-                ''        => '',
-                '6-7'     => '6-7',
-                '8-12'    => '8-12',
-                '13-18'   => '13-18',
-                'Over 18' => 'Over 18'
-            )
+            'opts'    => $handicap
         );
 
         $e[] = array(
@@ -409,15 +372,7 @@ class Toolkit_Contacts_GolfGiveaway
             'req'     => false,
             'name'    => 'round_year',
             'display' => 'How many rounds of golf do you play per year?',
-            'opts'    => array(
-                ''           => '',
-                '0-10'       => '0-10',
-                '11-20'      => '11-20',
-                '21-30'      => '21-30',
-                '31-40'      => '31-40',
-                '41-50'      => '41-50',
-                '51 or more' => '51 or more'
-            )
+            'opts'    => $roundYear
         );
         $e[] = array(
             'type'       => 'group',
diff --git a/Toolkit/Contacts/VacationPlanner.php b/Toolkit/Contacts/VacationPlanner.php
new file mode 100644 (file)
index 0000000..92e51dc
--- /dev/null
@@ -0,0 +1,388 @@
+<?php
+//    vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package  Contacts
+ * @author   Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @version  CVS: $Id: ContactUs.php,v 1.36 2010/07/14 23:33:15 jamie Exp $
+ * @link     http://demo.gaslightmedia.com
+ */
+
+/**
+ * Error codes for Toolkit_Contacts_ContactUs
+ *
+ * Codes are mapped to textual messaged by errorMessage() method,
+ * if you add a new code be sure to add a new message for it to errorMessage()
+ *
+ * @see Toolkit_Contacts_ContactUs::errorMessage()
+ */
+
+/**
+ * GLM Contact Us form
+ *
+ * This form handles rendering and processing the contact us form.
+ * Controls the email functionality of the form, whether the client
+ * has a contact DB to store contact records and how to insert/update
+ * submitted form values.
+ *
+ * @category  Toolkit
+ * @package   Contacts
+ * @author    Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license   http://www.gaslightmedia.com Gaslightmedia
+ * @link      http://demo.gaslightmedia.com
+ * @see       Toolkit_FormBuilder
+ */
+class Toolkit_Contacts_VacationPlanner
+    extends Toolkit_Contacts_ContactUs
+{
+    /**
+     * Contact type to be inserted into the DB as when the form is submitted
+     *
+     * This property is only valid when the [hasContactDB] property is set
+     * to true.
+     *
+     * N.B.
+     * If you subclass this class out to other forms that are
+     * inserted into the contact db, be sure to make each one of their
+     * contactType properties unique.  We don't check for duplicates.
+     *
+     * @var string
+     * @access protected
+     */
+    protected $contactType = '4';
+    /**
+     * Message to display if the form is successfully submitted
+     *
+     * @var    string
+     * @access protected
+     */
+    protected $successMsg = '
+        <style type="text/css">
+        #category {display:none;}
+        .listing {display:none;}
+        </style>
+        <div id="form-success-top">
+            Thank you for requesting the Visitors guide.
+        </div>';
+    /**
+     * Email subject and <h1> header in email
+     *
+     * It gets set in the constructor if you leave empty here, but you
+     * can set it to something different here to override that if you desire.
+     *
+     * @var    string
+     * @access protected
+     */
+    public $subject = "Visitor Guide Form from website";
+
+    /**
+     * Class constructor
+     *
+     * @param object $pdo         PHP Data Object
+     * @param string $formName    Form's name.
+     * @param string $method      (optional)Form's method defaults to 'POST'
+     * @param string $action      (optional)Form's action
+     * @param string $target      (optional)Form's target defaults to '_self'
+     * @param mixed  $attributes  (optional)Extra attributes for <form> tag
+     * @param bool   $trackSubmit (optional)Whether to track if the form was
+     *                              submitted by adding a special hidden field
+     *
+     * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+     * @access public
+     * @link   http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
+     * @see    HTML_QuickForm
+     */
+    public function __construct(
+        PDO $pdo,
+        $formName,
+        $method = 'post',
+        $action = '',
+        $target = '',
+        $attributes = null,
+        $trackSubmit = false
+    ) {
+        parent::__construct(
+            $pdo,
+            $formName,
+            $method,
+            $action,
+            $target,
+            $attributes,
+            $trackSubmit
+        );
+        $this->email = VISITOR_GUIDE_EMAIL;
+    }
+    //    {{{    configureConstants()
+
+    /**
+     * Constant variables for the form
+     *
+     * These values won't get overridden by POST or GET vars
+     *
+     * @return void
+     * @access public
+     */
+    public function configureConstants()
+    {
+        $constants = array(
+            'user_agent' => $_SERVER['HTTP_USER_AGENT'],
+            'remote_addr' => $_SERVER['REMOTE_ADDR']
+        );
+        $this->setupConstants($constants);
+    }
+
+    //    }}}
+    //    {{{    configureElements()
+
+    /**
+     * Form element definitions
+     *
+     * @return void
+     * @access public
+     */
+    public function configureElements()
+    {
+        $e = array();
+        $config     = parse_ini_file('config.ini', true);
+        $referredBy = $config['referred_by'];
+        $gender     = $config['gender'];
+        $age        = $config['age'];
+        $handicap   = $config['handicap'];
+        $howMany    = $config['how_many'];
+        $grpHowMany = $config['group_how_many'];
+        $roundYear  = $config['round_year'];
+        if ($this->hasContactDB) {
+            $this->setInterestFields();
+            //    Grouped Elements are defined here.
+            $this->interestsGroups =& $this->getInterestFields();
+        }
+
+        //    All Elements are created here.  This includes group element definitions.
+        $e[] = array(
+            'type' => 'hidden',
+            'req'  => false,
+            'name' => 'user_agent'
+        );
+        $e[] = array(
+            'type' => 'hidden',
+            'req'  => false,
+            'name' => 'remote_addr'
+        );
+        $e[] = array(
+            'type'    => 'header',
+            'name'    => 'firstHdr_rmv',
+            'display' => ''
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => true,
+            'name'    => 'fname',
+            'display' => 'First Name'
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => true,
+            'name'    => 'lname',
+            'display' => 'Last Name'
+        );
+        if ($this->tableName == 'customer') {
+            $add1 = 'add1';
+            $add2 = 'add2';
+        } else {
+            $add1 = 'address';
+            $add2 = 'address2';
+        }
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => true,
+            'name'    => $add1,
+            'display' => 'Address 1'
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => false,
+            'name'    => $add2,
+            'display' => 'Address 2'
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => true,
+            'name'    => 'city',
+            'display' => 'City'
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => true,
+            'name'    => 'state',
+            'display' => 'State/Province',
+            'opts'    => $GLOBALS['states']
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => true,
+            'name'    => 'zip',
+            'display' => 'ZIP/Postal Code'
+        );
+        $e[] = array(
+            'type'    => 'tel',
+            'req'     => false,
+            'name'    => 'phone',
+            'display' => 'Telephone number'
+        );
+        $e[] = array(
+            'type'    => 'tel',
+            'req'     => false,
+            'name'    => 'fax',
+            'display' => 'Fax number'
+        );
+        $e[] = array(
+            'type'    => 'email',
+            'req'     => true,
+            'name'    => 'email',
+            'display' => 'E-mail'
+        );
+        $e[] = array(
+            'type'    => 'email',
+            'req'     => true,
+            'name'    => 'email_rmv',
+            'display' => 'Verify E-mail'
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'gender',
+            'display' => 'Gender',
+            'opts'    => $gender
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'age',
+            'display' => 'Age',
+            'opts'    => $age
+        );
+        $e[] = array(
+            'type'    => 'static',
+            'name'    => 'sendHdr_rmv',
+            'display' => 'Please send me information on the following'
+        );
+        $e[] = array(
+            'type'    => 'advcheckbox',
+            'req'     => false,
+            'name'    => 'planner',
+            'display' => '',
+            'opts'    => 'Golf Vacation Planner',
+            'val'     => array(0, 1)
+        );
+        $e[] = array(
+            'type'    => 'advcheckbox',
+            'req'     => false,
+            'name'    => 'mail_ok',
+            'display' => '',
+            'opts'    => 'Yes, it is ok to send me email?',
+            'val'     => array(0, 1)
+        );
+
+        $e[] = array(
+            'type'    => 'advcheckbox',
+            'req'     => false,
+            'name'    => 'eclub',
+            'display' => '',
+            'opts'    => 'Yes, I would like to sign up for the Gaylord Golf Mecca E-club',
+            'val'     => array(0, 1)
+        );
+        $e[] = array(
+            'type'    => 'advcheckbox',
+            'req'     => false,
+            'name'    => 'members',
+            'display' => '',
+            'opts'    => 'Yes, I would like to receive information from any of your members',
+            'val'     => array(0, 1)
+        );
+        $e[] = array(
+            'type'    => 'textarea',
+            'req'     => false,
+            'name'    => 'comments',
+            'display' => 'Comments'
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'referred_by',
+            'display' => 'How did you hear about the Gaylord Area?',
+            'opts'    => $referredBy
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'how_many',
+            'display' => 'How many golf vacations do you take per year?',
+            'opts'    => $howMany
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'handicap',
+            'display' => 'Do you have a USGA Handicap',
+            'opts'    => $handicap
+        );
+
+        $e[] = array(
+            'type'       => 'group',
+            'req'        => false,
+            'name'       => 'travel_golf_group',
+            'label'      => 'Have you visited Gaylord area before?',
+            'seperator'  => ' ',
+            'appendName' => false,
+            'group'      => array(
+                array(
+                    'type'    => 'radio',
+                    'name'    => 'travel_golf_group',
+                    'display' => 'Yes',
+                    'opts'    => '',
+                    'att'     => 1,
+                    'val'     => 1
+                ),
+                array(
+                    'type'    => 'radio',
+                    'name'    => 'travel_golf_group',
+                    'display' => 'No',
+                    'opts'    => '',
+                    'att'     => 0,
+                    'val'     => 0
+                )
+            )
+        );
+        $e[] = array(
+            'type'    => 'CAPTCHA_Image',
+            'req'     => false,
+            'name'    => 'captcha_question',
+            'display' => 'Verification code',
+            'opts'    => $this->captchaOptions
+        );
+        $e[] = array(
+            'type'    => 'text',
+            'req'     => true,
+            'name'    => 'captcha_rmv',
+            'display' => 'Enter verification code'
+        );
+        $e[] = array(
+            'type'    => 'submit',
+            'req'     => false,
+            'name'    => 'submit_rmv',
+            'display' => 'Submit Form',
+            'opts'    => array('class' => 'button')
+        );
+
+        $this->setupElements($e);
+    }
+
+    //    }}}
+}
diff --git a/Toolkit/Contacts/VisitorGuide.php b/Toolkit/Contacts/VisitorGuide.php
deleted file mode 100755 (executable)
index 2755e94..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-<?php
-//    vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
-
-/**
- * File Doc Comment
- *
- * PHP version 5
- *
- * @category Toolkit
- * @package  Contacts
- * @author   Jamie Kahgee <jamie.kahgee@gmail.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @version  CVS: $Id: ContactUs.php,v 1.36 2010/07/14 23:33:15 jamie Exp $
- * @link     http://demo.gaslightmedia.com
- */
-
-/**
- * Error codes for Toolkit_Contacts_ContactUs
- *
- * Codes are mapped to textual messaged by errorMessage() method,
- * if you add a new code be sure to add a new message for it to errorMessage()
- *
- * @see Toolkit_Contacts_ContactUs::errorMessage()
- */
-
-/**
- * GLM Contact Us form
- *
- * This form handles rendering and processing the contact us form.
- * Controls the email functionality of the form, whether the client
- * has a contact DB to store contact records and how to insert/update
- * submitted form values.
- *
- * @category  Toolkit
- * @package   Contacts
- * @author    Jamie Kahgee <jamie.kahgee@gmail.com>
- * @copyright 2009 Jamie Kahgee
- * @license   http://www.gaslightmedia.com Gaslightmedia
- * @link      http://demo.gaslightmedia.com
- * @see       Toolkit_FormBuilder
- */
-class Toolkit_Contacts_VisitorGuide
-    extends Toolkit_Contacts_ContactUs
-{
-    /**
-     * Contact type to be inserted into the DB as when the form is submitted
-     *
-     * This property is only valid when the [hasContactDB] property is set
-     * to true.
-     *
-     * N.B.
-     * If you subclass this class out to other forms that are
-     * inserted into the contact db, be sure to make each one of their
-     * contactType properties unique.  We don't check for duplicates.
-     *
-     * @var string
-     * @access protected
-     */
-    protected $contactType = '4';
-    /**
-     * Message to display if the form is successfully submitted
-     *
-     * @var    string
-     * @access protected
-     */
-    protected $successMsg = '
-        <style type="text/css">
-        #category {display:none;}
-        .listing {display:none;}
-        </style>
-        <div id="form-success-top">
-            Thank you for requesting the Visitors guide.
-        </div>';
-    /**
-     * Email subject and <h1> header in email
-     *
-     * It gets set in the constructor if you leave empty here, but you
-     * can set it to something different here to override that if you desire.
-     *
-     * @var    string
-     * @access protected
-     */
-    public $subject = "Visitor Guide Form from website";
-
-    /**
-     * Class constructor
-     *
-     * @param object $pdo         PHP Data Object
-     * @param string $formName    Form's name.
-     * @param string $method      (optional)Form's method defaults to 'POST'
-     * @param string $action      (optional)Form's action
-     * @param string $target      (optional)Form's target defaults to '_self'
-     * @param mixed  $attributes  (optional)Extra attributes for <form> tag
-     * @param bool   $trackSubmit (optional)Whether to track if the form was
-     *                              submitted by adding a special hidden field
-     *
-     * @author Jamie Kahgee <jamie.kahgee@gmail.com>
-     * @access public
-     * @link   http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
-     * @see    HTML_QuickForm
-     */
-    public function __construct(
-        PDO $pdo,
-        $formName,
-        $method = 'post',
-        $action = '',
-        $target = '',
-        $attributes = null,
-        $trackSubmit = false
-    ) {
-        parent::__construct(
-            $pdo,
-            $formName,
-            $method,
-            $action,
-            $target,
-            $attributes,
-            $trackSubmit
-        );
-        $this->email = VISITOR_GUIDE_EMAIL;
-    }
-    //    {{{    configureConstants()
-
-    /**
-     * Constant variables for the form
-     *
-     * These values won't get overridden by POST or GET vars
-     *
-     * @return void
-     * @access public
-     */
-    public function configureConstants()
-    {
-        $constants = array(
-            'user_agent' => $_SERVER['HTTP_USER_AGENT'],
-            'remote_addr' => $_SERVER['REMOTE_ADDR']
-        );
-        $this->setupConstants($constants);
-    }
-
-    //    }}}
-    //    {{{    configureElements()
-
-    /**
-     * Form element definitions
-     *
-     * @return void
-     * @access public
-     */
-    public function configureElements()
-    {
-        $e = array();
-        if ($this->hasContactDB) {
-            $this->setInterestFields();
-            //    Grouped Elements are defined here.
-            $this->interestsGroups =& $this->getInterestFields();
-        }
-
-        //    All Elements are created here.  This includes group element definitions.
-        $e[] = array(
-            'type' => 'hidden',
-            'req'  => false,
-            'name' => 'user_agent'
-        );
-        $e[] = array(
-            'type' => 'hidden',
-            'req'  => false,
-            'name' => 'remote_addr'
-        );
-        $e[] = array(
-            'type'    => 'header',
-            'name'    => 'firstHdr_rmv',
-            'display' => ''
-        );
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => true,
-            'name'    => 'fname',
-            'display' => 'First Name'
-        );
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => true,
-            'name'    => 'lname',
-            'display' => 'Last Name'
-        );
-        if ($this->tableName == 'customer') {
-            $add1 = 'add1';
-            $add2 = 'add2';
-        } else {
-            $add1 = 'address';
-            $add2 = 'address2';
-        }
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => true,
-            'name'    => $add1,
-            'display' => 'Address 1'
-        );
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => false,
-            'name'    => $add2,
-            'display' => 'Address 2'
-        );
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => true,
-            'name'    => 'city',
-            'display' => 'City'
-        );
-        $e[] = array(
-            'type'    => 'select',
-            'req'     => true,
-            'name'    => 'state',
-            'display' => 'State/Province',
-            'opts'    => $GLOBALS['states']
-        );
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => true,
-            'name'    => 'zip',
-            'display' => 'ZIP/Postal Code'
-        );
-        $e[] = array(
-            'type'    => 'email',
-            'req'     => true,
-            'name'    => 'email',
-            'display' => 'Email'
-        );
-        $e[] = array(
-            'type'    => 'email',
-            'req'     => true,
-            'name'    => 'email_rmv',
-            'display' => 'Verify Email'
-        );
-        $e[] = array(
-            'type'    => 'tel',
-            'req'     => false,
-            'name'    => 'phone',
-            'display' => 'Phone'
-        );
-        $e[] = array(
-            'type'    => 'tel',
-            'req'     => false,
-            'name'    => 'fax',
-            'display' => 'Fax'
-        );
-        $e[] = array(
-            'type'    => 'textarea',
-            'req'     => false,
-            'name'    => 'comments',
-            'display' => 'Comments'
-        );
-        if ($this->hasContactDB) {
-            $e[] = array(
-                'type'    => 'advcheckbox',
-                'req'     => false,
-                'name'    => 'mail_ok',
-                'display' => 'I would like to receive Email Newsletters',
-                'opts'    => 'Yes, ',
-                'val'     => array(0, 1)
-            );
-            if (defined("MEMBERS_DB") && MEMBERS_DB) {
-                $e[] = array(
-                    'type'    => 'advcheckbox',
-                    'req'     => false,
-                    'name'    => 'members',
-                    'display' => 'I would like to receive information via e-mail from '.SITENAME.' Members',
-                    'opts'    => 'Yes, ',
-                    'val'     => array(0, 1)
-                );
-            }
-        }
-        if (is_array($this->interestsGroups)) {
-            foreach ($this->interestsGroups as $group => $gData) {
-                $this->myGroups[] = $gData;
-                $e[] = array(
-                    'type'       => 'group',
-                    'req'        => false,
-                    'name'       => 'interest['.$group.']',
-                    'group'         => $gData,
-                    'label'      => $group,
-                    'seperator'  => ' ',
-                    'appendName' => true
-                );
-            }
-        }
-        $e[] = array(
-            'type'    => 'CAPTCHA_Image',
-            'req'     => false,
-            'name'    => 'captcha_question',
-            'display' => 'Verification code',
-            'opts'    => $this->captchaOptions
-        );
-        $e[] = array(
-            'type'    => 'text',
-            'req'     => true,
-            'name'    => 'captcha_rmv',
-            'display' => 'Enter verification code'
-        );
-        $e[] = array(
-            'type'    => 'submit',
-            'req'     => false,
-            'name'    => 'submit_rmv',
-            'display' => 'Submit Form'
-        );
-
-        $this->setupElements($e);
-    }
-
-    //    }}}
-}
diff --git a/Toolkit/Contacts/cdb-form.ini b/Toolkit/Contacts/cdb-form.ini
new file mode 100644 (file)
index 0000000..701eec5
--- /dev/null
@@ -0,0 +1,107 @@
+; ini file for the setup of the How did you hear about us
+; used in the contact form and the vacation guide form.
+; these are comments
+; Don't change the names to the left
+
+
+[referred_by]
+'NULL' = ""
+golf_shows = "Golf Shows"
+michigan_travel_ideas = "Michigan Travel Ideas"
+michigan_golf = "Michigan Golf"
+golfing_in_mich = "Golfing in Michigan"
+aaa_living = "AAA Living"
+ohio_golf_living = "Ohio-Golf Living"
+newspaper = "Newspaper"
+radio = "Radio"
+postcard_mailing = "Postcard Mailing"
+travel_planner = "Travel Planner"
+search_engine = "Search Engine"
+michigan_living = "Michigan Living"
+fairways_golf_travel = "Fairways Golf Travel"
+referred_by_friend = "Referred by Friend"
+ohio_golf_pub = "Ohio Golf Publication"
+great_lakes_golf = "Great Lakes Golf"
+score_golf = "SCORE Golf"
+golf_mag = "Golf Magazine"
+miles_of_golf = "Miles of Golf"
+
+[gender]
+'NULL' = ""
+Male = "Male"
+Female = "Female"
+
+[age]
+'NULL' = ""
+18-25 = "18-25"
+26-34 = "26-34"
+35-44 = "35-44"
+45-55 = "45-55"
+OVER 55 = "OVER 55"
+
+[handicap]
+'NULL' = ""
+6-7 = "6-7"
+8-12 = "8-12"
+13-18 = "13-18"
+Over 18 = "Over 18"
+
+[how_many]
+'NULL' = ""
+1 = "1"
+2 = "2"
+3-5 = "3-5"
+6+ = "6 or More"
+
+[group_how_many]
+'NULL' = ""
+1 = "1"
+2 = "2"
+3 = "3"
+4 = "4"
+5 = "5"
+6 = "6"
+7 = "7"
+8 = "8"
+9 = "9"
+10 = "10"
+11 = "11"
+12 = "12"
+13 = "13"
+14 = "14"
+15 = "15"
+16 = "16"
+17 = "17"
+18 = "18"
+19 = "19"
+20 = "20+"
+
+[round_year]
+'NULL' = ""
+0-10 = "0-10"
+11-20 = "11-20"
+21-30 = "21-30"
+31-40 = "31-40"
+41-50 = "41-50"
+51+ = "51 or more"
+
+[pass_type]
+89 = "$89.00 Internet Special"
+75 = "$75.00 AAA Member Special"
+;85 = "$85 Holiday Special"
+
+[qty]
+1 = "1"
+2 = "2"
+3 = "3"
+4 = "4"
+5 = "5"
+6 = "6"
+7 = "7"
+8 = "8"
+9 = "9"
+10 = "10"
+
+[cc_type]
+Visa = "Visa"
+Mastercard = "Mastercard"
index 5de8b18..4d10320 100644 (file)
@@ -15,3 +15,110 @@ sequence = "contact_id_seq"
 5 = "Great Big Gaylord Golf Giveaway"
 6 = "2 for 1 Passport order"
 7 = "golf Giveaway"
+
+; ini file for the setup of the How did you hear about us
+; used in the contact form and the vacation guide form.
+; these are comments
+; Don't change the names to the left
+
+[referred_by]
+'' = ""
+golf_shows = "Golf Shows"
+michigan_travel_ideas = "Michigan Travel Ideas"
+michigan_golf = "Michigan Golf"
+golfing_in_mich = "Golfing in Michigan"
+aaa_living = "AAA Living"
+ohio_golf_living = "Ohio-Golf Living"
+newspaper = "Newspaper"
+radio = "Radio"
+postcard_mailing = "Postcard Mailing"
+travel_planner = "Travel Planner"
+search_engine = "Search Engine"
+michigan_living = "Michigan Living"
+fairways_golf_travel = "Fairways Golf Travel"
+referred_by_friend = "Referred by Friend"
+ohio_golf_pub = "Ohio Golf Publication"
+great_lakes_golf = "Great Lakes Golf"
+score_golf = "SCORE Golf"
+golf_mag = "Golf Magazine"
+miles_of_golf = "Miles of Golf"
+
+[gender]
+'' = ""
+Male = "Male"
+Female = "Female"
+
+[age]
+'' = ""
+18-25 = "18-25"
+26-34 = "26-34"
+35-44 = "35-44"
+45-55 = "45-55"
+OVER 55 = "OVER 55"
+
+[handicap]
+'' = ""
+6-7 = "6-7"
+8-12 = "8-12"
+13-18 = "13-18"
+Over 18 = "Over 18"
+
+[how_many]
+'' = ""
+1 = "1"
+2 = "2"
+3-5 = "3-5"
+6+ = "6 or More"
+
+[group_how_many]
+'' = ""
+1 = "1"
+2 = "2"
+3 = "3"
+4 = "4"
+5 = "5"
+6 = "6"
+7 = "7"
+8 = "8"
+9 = "9"
+10 = "10"
+11 = "11"
+12 = "12"
+13 = "13"
+14 = "14"
+15 = "15"
+16 = "16"
+17 = "17"
+18 = "18"
+19 = "19"
+20 = "20+"
+
+[round_year]
+'' = ""
+0-10 = "0-10"
+11-20 = "11-20"
+21-30 = "21-30"
+31-40 = "31-40"
+41-50 = "41-50"
+51+ = "51 or more"
+
+[pass_type]
+89 = "$89.00 Internet Special"
+75 = "$75.00 AAA Member Special"
+;85 = "$85 Holiday Special"
+
+[qty]
+1 = "1"
+2 = "2"
+3 = "3"
+4 = "4"
+5 = "5"
+6 = "6"
+7 = "7"
+8 = "8"
+9 = "9"
+10 = "10"
+
+[cc_type]
+Visa = "Visa"
+Mastercard = "Mastercard"
diff --git a/static/3.phtml b/static/3.phtml
new file mode 100644 (file)
index 0000000..e983729
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+if ($catid = filter_input(INPUT_GET, 'catid', FILTER_VALIDATE_INT)) {
+    $cf = new Toolkit_Contacts_VacationPlanner(
+        Toolkit_Database::getInstance(),
+        'contact_form',
+        'post',
+        BASE_URL . "index.php?catid=$catid"
+    );
+    $cf->configureForm();
+    $cf->useCaptcha(true);
+    echo $cf->toHtml();
+}