Quickform Problem in IE

From: Date: Mon, 23 May 2005 13:26:21 +0000
Subject: Quickform Problem in IE
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-37804@lists.php.net to get a copy of this message
Hi guys, First, sorry for posting this to pear-dev, but for reasons unknown to me pear-general no longer will accept email from me (if anyone would be kind enough, could they please forward this to that list as well?). I am currently experiencing an issue with quickform controller in IE. My application works fine, except in IE it just keeps redisplaying the first page. The first page basically just submits values from a select box and a radio group, so I've included below the serialized array of posted data from the same page in firefox and IE. It seems IE is chopping off the a:next string, and omitting something else i cannot think of. Anyway, I have also included the class as well as the html output, please let me know if you can help or know how to work around this issue. Firefox $_POST: a:5:{s:9:"PHPSESSID";s:32:"fe3c274d9e927c5136f4d6c4e46c212e";s:11:"_qf_default";s:6:"a:next";s:12:"type_of_loan";s:4:"Boat";s:8:"app_type";s:10:"individual";s:4:"next";s:5:"Begin";} IE $_POST: a:4:{s:9:"PHPSESSID";s:32:"928b76b2f324f7151ff7db163f507fed";s:12:"type_of_loan";s:4:"Boat";s:8:"app_type";s:10:"individual";s:4:"next";s:5:"Begin";} html output (form only) <form id="af" action="/personal/lc/preapp/index.php" method="post" name="a" id="a" onsubmit="return validate_a(this);" > <input type="hidden" name="PHPSESSID" value="fe3c274d9e927c5136f4d6c4e46c212e" /> <p id="required"><span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%;"> denotes required field</span></p ><input name="_qf_default" type="hidden" value="a:next" /> <fieldset> <legend>Introduction</legend> <div id="foo"> <label for="type_of_loan">This is a loan for<span class="dot">*</span>:</label> <select name="type_of_loan"> <option value="">Select One...</option> <option value="Motorcycle">Motorcycle</option> <option value="Boat">Boat</option> </select> </div> <fieldset class="radiogroup"> <legend>Type of Loan<span class="dot">*</span></legend> <label><input class="radio" name="app_type" value="individual" type="radio" id="qf_256f25" />Individual</label> <label><input class="radio" name="app_type" value="individual_stip" type="radio" id="qf_31cd8d" />Individual with Stipulations</label> <label><input class="radio" name="app_type" value="joint" type="radio" id="qf_a007f2" />Joint</label> <br> </fieldset> <br> <input class="submit" name="next" value="Begin" type="submit" /> <br> </fieldset> <!-- main content ends --> </form> Class file: <?php // Class representing a form class introPage extends HTML_QuickForm_Page { var $_template = 'intro.tpl'; /* this should be put in some super class to subclass */ function getTemplate() { return $this->_template; } function buildForm() { $this->_formBuilt = true; $this->_addFormElements(); $this->_addRules(); } function _addRules() { $this->addRule('type_of_loan', 'Please select what the loan is for.', 'required', '', 'client'); } function _addFormElements() { $this->addElement('header', 'titleHeader', 'Introduction'); // Add some elements to the form $type_of_loan = array('' =>'Select One...', 'Motorcycle' => 'Motorcycle', 'Boat' => 'Boat'); $this->addElement('select', 'type_of_loan', 'This is a loan for<span class="dot">*</span>:', $type_of_loan); $this->addElement('radio', 'app_type', 'Individual', NULL, 'individual', array('class' => 'radio')); $this->addElement('radio', 'app_type', 'Individual with Stipulations', NULL,'individual_stip', array('class' => 'radio')); $this->addElement('radio', 'app_type', 'Joint', NULL, 'joint', array('class' => 'radio')); $this->addElement('submit', 'next', 'Begin', array('class' => 'submit')); $this->setDefaultAction('next'); } } ?> And finally, the index page where the front controller is created and ran: <?php require_once ('./config.php'); require_once(INCLUDE_PATH . 'init.php'); // Instantiate the Controller $controller =& new HTML_QuickForm_Controller('LoanPreApp', true); // Add the page to Controller $intro =& new introPage('a'); $controller->addPage($intro); $controller->addPage( new ApplicantInfo('b') ); $controller->addPage( new ApplicantEmployment('c') ); // determine if this is an app including co-borrower $values =& $controller->exportValues('a'); /* Display CoApplicant pages if app_type requires it */ if(($values['app_type'] == 'individual_stip')||($values['app_type'] == 'joint')) { $controller->addPage( new coApplicantInfo('d') ); $controller->addPage( new coApplicantEmployment('e') ); } $controller->addPage( new referenceInfo('f') ); switch($values['type_of_loan']) { case 'Motorcycle': $controller->addPage( new motorcycleInfo('g') ); break; case 'Boat': $controller->addPage( new boatInfo('g') ); break; } $controller->addPage( new confirmationPage('h') ); // Overide Default Actions $controller->addAction('process', new ActionProcess()); $controller->addAction('display', new ActionDisplay()); // Process the request $controller->run(); ?> Any ideas? Thanks, JC

« previous php.pear.dev (#37804) next »