--- /dev/null
+<?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_GolfGiveaway
+ 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 = '7';
+ /**
+ * 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 entering the Gaylord America\'s Summer Golf Mecca\'s
+ "Great Big Gaylord Golf Getaway!"
+ </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 = ENTER_TO_WIN_EMAIL;
+ }
+ // {{{ 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' => 'tel',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'fax',
+ 'display' => 'Fax'
+ );
+ $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' => 'static',
+ 'name' => 'sendHdr_rmv',
+ 'display' => 'Please send me information on the following'
+ );
+ $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' => 'giveaway',
+ 'display' => '',
+ 'opts' => 'Yes, Register me to WIN the Gaylord Golf Giveaway!',
+ '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 or Questions'
+ );
+
+
+ $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' => 'group',
+ 'req' => false,
+ 'name' => 'travel_air',
+ 'label' => 'Have you visited other northern Michigan Golf Destinations?',
+ 'seperator' => ' ',
+ 'appendName' => false,
+ 'group' => array(
+ array(
+ 'type' => 'radio',
+ 'name' => 'travel_air',
+ 'display' => 'Yes',
+ 'opts' => '',
+ 'att' => 1,
+ 'val' => 1
+ ),
+ array(
+ 'type' => 'radio',
+ 'name' => 'travel_air',
+ 'display' => 'No',
+ 'opts' => '',
+ 'att' => 0,
+ 'val' => 0
+ )
+ )
+ );
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'quote',
+ 'label' => 'Are you interested in Golf Course or Resort Real Estate?',
+ 'seperator' => ' ',
+ 'appendName' => false,
+ 'group' => array(
+ array(
+ 'type' => 'radio',
+ 'name' => 'quote',
+ 'display' => 'Yes',
+ 'opts' => '',
+ 'att' => 1,
+ 'val' => 1
+ ),
+ array(
+ 'type' => 'radio',
+ 'name' => 'quote',
+ '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'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+}
--- /dev/null
+<?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_GreatBigGaylordGolfGetaway
+ 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 entering the Gaylord America\'s Summer Golf Mecca\'s
+ "Great Big Gaylord Golf Getaway!"
+ </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 = ENTER_TO_WIN_EMAIL;
+ }
+ // {{{ 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' => 'tel',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $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' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'giveaway',
+ 'display' => '',
+ 'opts' => 'Yes, Register me to WIN the Gaylord Golf Giveaway!',
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ 'display' => '',
+ 'opts' => 'Yes, I would like to sign up for the Gaylord Golf Mecca E-club',
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'travel_air',
+ 'label' => 'Do you plan to travel by Air?',
+ 'seperator' => ' ',
+ 'appendName' => false,
+ 'group' => array(
+ array(
+ 'type' => 'radio',
+ 'name' => 'travel_air',
+ 'display' => 'Yes',
+ 'opts' => '',
+ 'att' => 1,
+ 'val' => 1
+ ),
+ array(
+ 'type' => 'radio',
+ 'name' => 'travel_air',
+ 'display' => 'No',
+ 'opts' => '',
+ 'att' => 0,
+ 'val' => 0
+ )
+ )
+ );
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'travel_golf_group',
+ 'label' => 'Do you plan to travel with a golf group?',
+ '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' => 'group',
+ 'req' => false,
+ 'name' => 'quote',
+ 'label' => 'Would you like a quote?',
+ 'seperator' => ' ',
+ 'appendName' => false,
+ 'group' => array(
+ array(
+ 'type' => 'radio',
+ 'name' => 'quote',
+ 'display' => 'Yes',
+ 'opts' => '',
+ 'att' => 1,
+ 'val' => 1
+ ),
+ array(
+ 'type' => 'radio',
+ 'name' => 'quote',
+ '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'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+}
sequence = "contact_id_seq"
[contact_types]
-1 = "Web Contact"
-2 = "E-News"
-3 = "Travel Planner"
-4 = "Visitor Guide"
+;1 = "Web Contact"
+2 = "Enews Sign Up"
+;3 = "Travel Planner"
+4 = "Vacation Planner"
+5 = "Great Big Gaylord Golf Giveaway"
+6 = "2 for 1 Passport order"
+7 = "golf Giveaway"
<div id="contact">
- {form.javascript:h}
- {form.outputHeader():h}
- {form.hidden:h}
- {hidden}
- <table>
- {foreach:form.sections,sec}
- <tr>
- <td class="header" colspan="2">
- <b>{sec.header:h}</b></td>
- </tr>
+{form.javascript:h}
+{form.outputHeader():h}
+{form.hidden:h}
+{hidden}
+
+{foreach:form.sections,sec}
+ {if:sec.header}
+ <fieldset>
+ <legend>{sec.header:h}</legend>
+ {end:}
+ <div class="row">
{foreach:sec.elements,elem}
{if:elem.style}
{elem.outputStyle():h}
{else:}
{if:elem.isButton()}
{if:elem.notFrozen()}
- <tr>
- <td class="labelcell"> </td>
- <td class="fieldcell">{elem.html:h}</td>
- </tr>
+ <div class="small-11 small-centered columns">{elem.html:h}</div>
{end:}
{else:}
- <tr>
- {if:elem.isType(#textarea#)}
- <td colspan="2">
- {if:elem.required}<span class="req">*</span>{end:}
- {if:elem.error}<div class="req">{end:}
- {elem.label:h}<br>
- {if:elem.error}</div>{end:}
+ {if:elem.error}
+ <div class="small-11 small-centered columns error">
{else:}
- {if:elem.isType(#CAPTCHA_Image#)}
- <td class="labelcell captcha">
- {if:elem.required}<span class="req">*</span>{end:}
- {if:elem.error}<div class="req">{end:}
- {elem.label:h}
- {if:elem.error}</div>{end:}
- </td>
- <td class="fieldcell">
- {else:}
- {if:elem.isType(#group#)}
- <td colspan="2">
- {if:elem.required}<span class="req">*</span>{end:}
- {if:elem.error}<div class="req">{end:}
- {elem.label:h}<br>
- {if:elem.error}</div>{end:}
- {else:}
- <td class="labelcell">
- {if:elem.required}<span class="req">*</span>{end:}
- {if:elem.error}<div class="req">{end:}
- {elem.label:h}
- {if:elem.error}</div>{end:}
- </td>
- {if:elem.isName(#interest#)}
- <td class="fieldcell checkbox">
- {else:}
- <td class="fieldcell">
- {end:}
- {end:}
- {end:}
+ <div class="small-11 small-centered columns">
{end:}
- {if:elem.error}<div class="error">{elem.error}</div>{end:}
- {if:elem.isType(#group#)}
- {foreach:elem.elements,gitem}
- {gitem.label:h}
- {gitem.html:h}{if:gitem.required}<div class="req">*</div>{end:}
- {if:elem.separator}{elem.separator:h}{end:}
- {end:}
- {else:}
+ {if:elem.isType(#textarea#)}
+ {if:elem.required}<label class="req"><span class="req">*</span>{else:}<label>{end:}
+ {elem.label:h}
{elem.html:h}
- {if:elem.isName(#captcha_rmv#)}
+ {if:elem.error}<small class="error">{elem.error}</small>{end:}
+ </label>
+
+ {else:}
+ {if:elem.isType(#CAPTCHA_Image#)}
+ {if:elem.required}<label><span class="req">*</span>{else:}<label class="req glmCaptchaImg">{end:}
+ {elem.label:h}
+ {elem.html:h}
<span
class="tooltip"
title="Verification Code|To help us distinguish between
information submitted by individuals and those automatically
entered by software robots, please type the letters shown.">What is this?
</span>
+ {if:elem.error}<small class="error">{elem.error}</small>{end:}
+ </label>
+ {else:}
+ {if:elem.isType(#group#)}
+ {if:elem.required}<label class="req"><span class="req">*</span>{else:}<label>{end:}
+ {elem.label:h}
+ </label>
+ {foreach:elem.elements,gitem}
+ {gitem.html:h}
+ {if:gitem.required}<div class="req">*</div>{end:}
+ <?php
+ preg_match('%id="(.*)"%', $gitem->html, $matches);
+ if ($matches[1]) {
+ $labelFor = $matches[1];
+ }
+ ?>
+ <label for="<?php echo $labelFor;?>">{gitem.label:h}</label>
+ {end:}
+ {if:elem.error}<small class="error">{elem.error}</small>{end:}
+ {else:}
+ {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>
+ {end:}
+ {if:elem.error}<small class="error">{elem.error}</small>{end:}
+ {end:}
{end:}
{end:}
- </td>
- </tr>
- {end:}
- {end:}
+ </div> <!-- end for columns -->
+ {end:}<!-- end for if:else isButton -->
+ {end:}<!-- end for if:else elem.style -->
{end:} <!-- end for foreach:sec.element,elem -->
+ </div> <!-- end for row -->
+
+ {if:sec.header}
+ </fieldset>
+ {end:}
{end:} <!-- end for foreach:form.section,sec -->
- </table>
- </form>
- {if:form.requirednote}
+
+ </form>
+ {if:form.requirednote}
<div>{form.requirednote:h}</div>
{end:}
</div>
<div id="contact">
- <form{attributes}>
- {hidden}
- <table>
- {content}
- </table>
- </form>
-</div>
\ No newline at end of file
+ <form{attributes}>
+ {hidden}
+ <table>
+ {content}
+ </table>
+ </form>
+</div>
--- /dev/null
+<?php
+if ($catid = filter_input(INPUT_GET, 'catid', FILTER_VALIDATE_INT)) {
+ $cf = new Toolkit_Contacts_GolfGiveaway(
+ Toolkit_Database::getInstance(),
+ 'contact_form',
+ 'post',
+ BASE_URL . "index.php?catid=$catid"
+ );
+ $cf->configureForm();
+ $cf->useCaptcha(true);
+ echo $cf->toHtml();
+}
--- /dev/null
+<?php
+if ($catid = filter_input(INPUT_GET, 'catid', FILTER_VALIDATE_INT)) {
+ $cf = new Toolkit_Contacts_GreatBigGaylordGolfGetaway(
+ Toolkit_Database::getInstance(),
+ 'contact_form',
+ 'post',
+ BASE_URL . "index.php?catid=$catid"
+ );
+ $cf->configureForm();
+ $cf->useCaptcha(true);
+ echo $cf->toHtml();
+}