Jump to content

paulgami

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

paulgami's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It's already getting passed along to the final page though. Currently my last page consists of.. [code=php:0]$values = $page->controller->exportValues(); var_dump($values);[/code] .. which outputs all the fields from all pages.  Can I not somehow access that data before the exportValues() call?  ???
  2. I've built a multipage form using QuickForm_Controller.  It has 5 pages, plus a final confirmation page, not too dissimilar to a shopping cart's checkout functionality. If I'm on page3 and want to reference a particular field on that page in javascript I use:[code]page3.fieldname.value[/code] and it works just fine. Is it possible to reference fields on other pages?  When I try to reference an item on page2 from page3, for example, I get this error: [code]Error: page2 is not defined Source File: http://testbox/formtest.php?_qf_page3_display=true Line: 1[/code]
  3. I'm working from one of the examples that comes with PEAR's HTML_QuickForm_Controller (1.0.6) - regWizard.php and all is fine. However, I'd like to add a feature where I present the user with a link that opens a popup to get some information, and then returns the user to the form that now has one of its textfields populated with the result of the processing in the popup.  Using a similar method to how some travel sites will have a calendar popup in order to fill in a date field. The relevant portion of the code: [code=php:0]$this->addElement('link','enginepopup','Choose your engine','enginechoice.php','click here'); $this->addElement('text','engineModel','Engine Model', array('size' => 30, 'maxlength' => 63));[/code] I'd like for a user to click on the 'enginepopup' link, and have that popup pass back the result into the following text element 'engineModel'. Is that possible?  I suspect some javascript is involved, but I'm not sure where to start.  I'd appreciate any information. Thanks The full class for that step of the "wizard": [code=php:0]class Aircraft_Information extends HTML_QuickForm_Page {     function buildForm()     {         $this->_formBuilt = true;         $this->addElement('header', 'data_header', 'Aircraft Information');                 $this->addElement('text', 'aircraftMfr', 'Aircraft Manufacturer', array('size' => 30, 'maxlength' => 63));         $this->addElement('text', 'aircraftModel', 'Aircraft Model', array('size' => 30, 'maxlength' => 63));         $this->addElement('text', 'aircraftYear', 'Aircraft Year', array('size' => 30, 'maxlength' => 63));         $this->addElement('text', 'aircraftRegNo', 'Aircraft Registration No.', array('size' => 30, 'maxlength' => 63));         $this->addElement('text', 'aircraftSerNo', 'Aircraft Serial No.', array('size' => 30, 'maxlength' => 63));              $this->addElement('link','enginepopup','Choose your engine','enginechoice.php','click here');         $this->addElement('text','engineModel','Engine Model', array('size' => 30, 'maxlength' => 63));         $prevnext[] =& $this->createElement('submit',  $this->getButtonName('back'), '<< Previous step');         $prevnext[] =& $this->createElement('submit',  $this->getButtonName('next'), 'Next step >>');         $this->addGroup($prevnext, 'buttons', '', '&nbsp;', false);                 $this->addRule('aircraftRegNo', 'Aircraft Registration No. is required', 'required');         $this->addRule('aircraftSerNo', 'Aircraft Serial No. is required', 'required');                 $this->setDefaultAction('next');     } }[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.