Continued Work on Forms
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 27 Feb 2015 15:32:52 +0000 (10:32 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 27 Feb 2015 15:32:52 +0000 (10:32 -0500)
Working on Getaway form and Giveaway form.
Testing client email also.

Toolkit/Contacts/ContactUs.php
Toolkit/Contacts/GolfGiveaway.php
Toolkit/Contacts/GreatBigGaylordGolfGetaway.php
Toolkit/Contacts/templates/contactForm.html
templates/template.html

index 5a52256..4336cdc 100755 (executable)
@@ -87,6 +87,7 @@ class Toolkit_Contacts_ContactUs
      * which groups to use on form if empty will grab all groups
      */
     protected $contactInqGroups = array();
+    protected $includeContactStyleSheet = false;
 
     /**
      * Who to send the email to when the contact form is submitted
@@ -555,7 +556,8 @@ class Toolkit_Contacts_ContactUs
             'type'    => 'submit',
             'req'     => false,
             'name'    => 'submit_rmv',
-            'display' => 'Submit Form'
+            'display' => 'Submit Form',
+            'opts'    => array('class' => 'button')
         );
 
         $this->setupElements($e);
@@ -798,12 +800,25 @@ class Toolkit_Contacts_ContactUs
             }
         }
 
+        /* Boolean types */
         if ($this->elementExists('mail_ok')) {
             //    Clean up the mail_ok flag so its human readable
             $page->formData['mail_ok']['label'] = 'Emails';
             $page->formData['mail_ok']['element']
                 = ($page->formData['mail_ok']['element']) ? 'Yes' : 'No';
         }
+        if ($this->elementExists('giveaway')) {
+            //    Clean up the mail_ok flag so its human readable
+            $page->formData['giveaway']['label'] = 'Register me to WIN Gaylord Golf Giveaway';
+            $page->formData['giveaway']['element']
+                = ($page->formData['giveaway']['element']) ? 'Yes' : 'No';
+        }
+        if ($this->elementExists('eclub')) {
+            //    Clean up the mail_ok flag so its human readable
+            $page->formData['eclub']['label'] = 'Sign up for the Gaylord Golf Mecca E-club';
+            $page->formData['eclub']['element']
+                = ($page->formData['eclub']['element']) ? 'Yes' : 'No';
+        }
 
         if (defined("MEMBERS_DB") && MEMBERS_DB) {
             if ($this->elementExists('members')) {
index cc3e5c8..693e710 100755 (executable)
@@ -69,8 +69,7 @@ class Toolkit_Contacts_GolfGiveaway
         .listing {display:none;}
         </style>
         <div id="form-success-top">
-        Thank you for entering the Gaylord America\'s Summer Golf Mecca\'s
-        "Great Big Gaylord Golf Getaway!"
+        Thank you for entering to win the Gaylord Golf Mecca "Ultimate Golf Giveaway"!
         </div>';
     /**
      * Email subject and <h1> header in email
@@ -81,7 +80,7 @@ class Toolkit_Contacts_GolfGiveaway
      * @var    string
      * @access protected
      */
-    public $subject = "Visitor Guide Form from website";
+    public $subject = "New Entry for Golf Giveaway";
 
     /**
      * Class constructor
@@ -118,7 +117,7 @@ class Toolkit_Contacts_GolfGiveaway
             $attributes,
             $trackSubmit
         );
-        $this->email = ENTER_TO_WIN_EMAIL;
+        $this->email = 'vagrant@localhost';//OWNER_EMAIL;
     }
     //    {{{    configureElements()
 
@@ -207,25 +206,50 @@ class Toolkit_Contacts_GolfGiveaway
             'type'    => 'tel',
             'req'     => false,
             'name'    => 'phone',
-            'display' => 'Phone'
+            'display' => 'Telephone number'
         );
         $e[] = array(
             'type'    => 'tel',
             'req'     => false,
             'name'    => 'fax',
-            'display' => 'Fax'
+            'display' => 'Fax number'
         );
         $e[] = array(
             'type'    => 'email',
             'req'     => true,
             'name'    => 'email',
-            'display' => 'Email'
+            'display' => 'E-mail'
         );
         $e[] = array(
             'type'    => 'email',
             'req'     => true,
             'name'    => 'email_rmv',
-            'display' => 'Verify Email'
+            'display' => 'Verify E-mail'
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'gender',
+            'display' => 'Gender',
+            'opts'    => array(
+                ''       => '',
+                'Male'   => 'Male',
+                'Female' => 'Female'
+            )
+        );
+        $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'
+            )
         );
         $e[] = array(
             'type'    => 'static',
@@ -273,6 +297,60 @@ 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'    => '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'
+            )
+        );
+        $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'
+            )
+        );
 
         $e[] = array(
             'type'       => 'group',
@@ -326,6 +404,21 @@ class Toolkit_Contacts_GolfGiveaway
                 )
             )
         );
+        $e[] = array(
+            'type'    => 'select',
+            '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'
+            )
+        );
         $e[] = array(
             'type'       => 'group',
             'req'        => false,
@@ -369,7 +462,8 @@ class Toolkit_Contacts_GolfGiveaway
             'type'    => 'submit',
             'req'     => false,
             'name'    => 'submit_rmv',
-            'display' => 'Submit Form'
+            'display' => 'Submit Form',
+            'opts'    => array('class' => 'button')
         );
 
         $this->setupElements($e);
index f668367..ef7235e 100755 (executable)
@@ -56,7 +56,7 @@ class Toolkit_Contacts_GreatBigGaylordGolfGetaway
      * @var string
      * @access protected
      */
-    protected $contactType = '4';
+    protected $contactType = '5';
     /**
      * Message to display if the form is successfully submitted
      *
@@ -81,7 +81,7 @@ class Toolkit_Contacts_GreatBigGaylordGolfGetaway
      * @var    string
      * @access protected
      */
-    public $subject = "Visitor Guide Form from website";
+    public $subject = "New Entry for Great Big Gaylord Golf Getaway";
 
     /**
      * Class constructor
@@ -118,7 +118,7 @@ class Toolkit_Contacts_GreatBigGaylordGolfGetaway
             $attributes,
             $trackSubmit
         );
-        $this->email = ENTER_TO_WIN_EMAIL;
+        $this->email = 'vagrant@localhost';//OWNER_EMAIL;
     }
     //    {{{    configureElements()
 
@@ -207,19 +207,19 @@ class Toolkit_Contacts_GreatBigGaylordGolfGetaway
             'type'    => 'tel',
             'req'     => false,
             'name'    => 'phone',
-            'display' => 'Phone'
+            'display' => 'Telephone number'
         );
         $e[] = array(
             'type'    => 'email',
             'req'     => true,
             'name'    => 'email',
-            'display' => 'Email'
+            'display' => 'E-mail'
         );
         $e[] = array(
             'type'    => 'email',
             'req'     => true,
             'name'    => 'email_rmv',
-            'display' => 'Verify Email'
+            'display' => 'Verify E-mail'
         );
         $e[] = array(
             'type'    => 'advcheckbox',
@@ -332,7 +332,8 @@ class Toolkit_Contacts_GreatBigGaylordGolfGetaway
             'type'    => 'submit',
             'req'     => false,
             'name'    => 'submit_rmv',
-            'display' => 'Submit Form'
+            'display' => 'Submit Form',
+            'opts'    => array('class' => 'button')
         );
 
         $this->setupElements($e);
index 3594042..da3e1bb 100644 (file)
                             </label>
                         {else:}
                             {if:elem.isType(#group#)}
-                                {if:elem.required}<label class="req"><span class="req">*</span>{else:}<label>{end:}
-                                {elem.label:h}
-                                </label>
+                                {if:elem.required}
+                                    <label class="req"><span class="req">*</span>{elem.label:h}</label>
+                                {else:}
+                                    <label>{elem.label:h}</label>
+                                {end:}
                                 {foreach:elem.elements,gitem}
                                 {gitem.html:h}
                                     {if:gitem.required}<div class="req">*</div>{end:}
                                 {if:elem.required}
                                     <label class="req"><span class="req">*</span>{elem.label:h}{elem.html:h}</label>
                                 {else:}
-                                    <label>{elem.label:h}{elem.html:h}</label>
+                                    {if:elem.isType(#checkbox#)}
+                                        {elem.label:h}{elem.html:h}
+                                    {else:}
+                                        <label>{elem.label:h}</label>{elem.html:h}
+                                    {end:}
                                 {end:}
                                 {if:elem.error}<small class="error">{elem.error}</small>{end:}
                             {end:}
index 0d7f163..7431c64 100644 (file)
@@ -1,6 +1,5 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-"http://www.w3.org/TR/html4/strict.dtd">
-<html>
+<!doctype html>
+<html class="no-js" lang="en">
 <head>
 <title>{pageTitle:h}</title>
 <meta http-equiv="content-type" content="text/html;charset=utf-8">