From 8011b6495c98c7205f1d141f7c8175b5afcad3af Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 11 Jul 2014 09:08:58 -0400 Subject: [PATCH] Work on order form trying to get the quickform to work --- index.php | 5 +++-- static/9.phtml | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/index.php b/index.php index 0ed28ac..dd0e9e9 100644 --- a/index.php +++ b/index.php @@ -51,8 +51,9 @@ HTTP_Session2::useCookies(false); HTTP_Session2::start(); if (isset($qfKeys) && !empty($qfKeys)) { - if (ctype_digit($_SESSION['_regWizard_container']['values']['page1']['catid'])) { - $catid = $_SESSION['_regWizard_container']['values']['page1']['catid']; +// var_dump($_REQUEST);exit; + if (ctype_digit($_SESSION['_Wizard_container']['values']['page1']['catid'])) { + $catid = $_SESSION['_Wizard_container']['values']['page1']['catid']; } elseif (ctype_digit($_REQUEST['catid'])) { $catid = $_REQUEST['catid']; } diff --git a/static/9.phtml b/static/9.phtml index 2326739..e3e5c2a 100644 --- a/static/9.phtml +++ b/static/9.phtml @@ -9,7 +9,7 @@ require_once 'HTML/QuickForm/Action/Jump.php'; require_once 'HTML/QuickForm/Action/Display.php'; // Start the session, form-page values will be kept there -session_start(); +//session_start(); // Check to make sure the end date is the // same as the start date or later in the year. @@ -61,7 +61,7 @@ class PageBase extends HTML_QuickForm_Page function __construct($formName, $method = 'post', $target = 'index.php?catid=9', $attributes = null) { //$target = ($_POST['_qf_default'] == 'page2:next') ? $target . '&_qf_page2_display=true' : $target; - parent::__construct($formName, $method, BASE_URL . $target, $attributes); + parent::__construct($formName, $method, MEDIA_BASE_URL . $target, $attributes); $this->_validationType = 'server'; $this->_partySize = array('' => '-- Select Size --') + range(0, 10); } @@ -279,7 +279,7 @@ class PageThird extends PageBase $elements[] = array('type' => 'header', 'req' => false, 'name' => 'header_rmv', 'display' => 'Package Price Quote Request page 3 of 4'); $elements[] = array('type' => 'static', 'req' => false, 'name' => 'tos_rmv', 'display' => 'Terms of Service:', 'opts' => $tos); - $elements[] = array('type' => 'static', 'req' => false, 'name' => 'view_courses_rmv', 'display' => 'Click here to view course
desriptions and locations:', 'opts' => 'View Courses'); + $elements[] = array('type' => 'static', 'req' => false, 'name' => 'view_courses_rmv', 'display' => 'Click here to view course
desriptions and locations:', 'opts' => 'View Courses'); $elements[] = array('type' => 'elementGrid', 'req' => false, 'name' => 'golfing', 'display' => 'Golfing Preference:', 'opts' => array('actAsGroup' => false)); $prevnext[] =& $this->createElement('submit', $this->getButtonName('next'), 'Next step >>'); @@ -312,8 +312,8 @@ class PageThird extends PageBase $pmgolf[] =& $this->createElement('select', "pmTeeTime$i", null, $evening); $pmgolf[] =& $this->createElement('select', "pmCourse$i", null, $courses); - $source->addRow(&$amgolf, $calDate['date']); - $source->addRow(&$pmgolf, ' '); + $source->addRow($amgolf, $calDate['date']); + $source->addRow($pmgolf, ' '); } } } @@ -490,8 +490,8 @@ class ActionProcess extends HTML_QuickForm_Action { function perform(&$page, $actionName) { - $return = $this->_getEntireForm(&$page); - if ($this->_process(&$page, $return)) { + $return = $this->_getEntireForm($page); + if ($this->_process($page, $return)) { $return = "

The information below was successfully submitted

\n
\n{$return}\n
\n"; $return = "

Thank you for requesting a custom package price quote from Big Fore Golf. The lodging partner that you requested will receive your request and personally @@ -770,7 +770,7 @@ class ActionProcess extends HTML_QuickForm_Action } } -$wizard =& new HTML_QuickForm_Controller('Wizard'); +$wizard = new HTML_QuickForm_Controller('Wizard'); $wizard->addPage(new PageFirst('page1')); $wizard->addPage(new PageSecond('page2')); $wizard->addPage(new PageThird('page3')); @@ -779,4 +779,6 @@ $wizard->addPage(new PageFourth('page4')); $wizard->addAction('display', new ActionDisplay()); $wizard->addAction('process', new ActionProcess()); -$pqForm = $wizard->run(); +echo $wizard->run(); +$form = '

'.print_r($_SESSION, true).'
'; +echo $form; -- 2.17.1