When you use one script to display multiple things you need to know
which thing to display. This is usually via GET or POST fields. I was
just mentioning that you have to make sure to include these in your
forms somehow.
--
Justin Patrin
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Well at the moment I have problems with this. I'm building an app using a dispatch model. All header and footer stuff in the index.php, and other pages that are included depending on the value $_GET[PAGE_DISPLAY_VAR];
On one of these page I'm trying to use a QF_Controller to make a wizard form.
So the beginning of my QF_Page look like this :
class Page_Accord extends HTML_QuickForm_Page
{
function buildForm()
{
global $page;
$this-
updateAttributes(array("action"=>"index.php?".PAGE_DISPLAY_VAR."=".$page));
$this->_formBuilt = true;
The rest is copy-paste from the regWizard example in the doc.
the HTML code for the first form is good (<form action="index.php?showme=add" method="post" ... >)
But when submitted HTML_QuickForm_Action_Jump redirects to index.php?_qf_page2_display=true
No chance that there is a name conflict. It looks like it comes from these lines in HTML_QuickForm_Action_jump.php :
// generate the URL for the page 'display' event and redirect to it
$action = $current->getAttribute('action');
$url = $action . (false === strpos($action, '?')? '?': '&') .
$current->getButtonName('display') . '=true' .
((!defined('SID') || '' == SID)? '': '&' . SID);
header('Location: ' . $url);
exit;
}
Other variables coming from the url aren't preserved. I'm wondering wether it's a bug or my "dispatch" interpretation wrong ?