paulgami Posted August 23, 2006 Share Posted August 23, 2006 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 definedSource File: http://testbox/formtest.php?_qf_page3_display=trueLine: 1[/code] Link to comment https://forums.phpfreaks.com/topic/18426-cant-access-form-field-from-previous-page/ Share on other sites More sharing options...
trq Posted August 23, 2006 Share Posted August 23, 2006 [quote]Is it possible to reference fields on other pages?[/quote]No. You'll need to pass this data from one page to the next. Link to comment https://forums.phpfreaks.com/topic/18426-cant-access-form-field-from-previous-page/#findComment-79222 Share on other sites More sharing options...
paulgami Posted August 23, 2006 Author Share Posted August 23, 2006 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? ??? Link to comment https://forums.phpfreaks.com/topic/18426-cant-access-form-field-from-previous-page/#findComment-79253 Share on other sites More sharing options...
SammyP Posted August 23, 2006 Share Posted August 23, 2006 Why can't you just use the exportValues() call on p3?Fair chance it will still be available on p5. Link to comment https://forums.phpfreaks.com/topic/18426-cant-access-form-field-from-previous-page/#findComment-79255 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.