Jump to content

Can't access form field from previous page


paulgami

Recommended Posts

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]
Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.