HTML_QuickForm_Controller - setDefaultAction behaviour

From: Date: Sat, 13 Sep 2008 13:40:41 +0000
Subject: HTML_QuickForm_Controller - setDefaultAction behaviour
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29257@lists.php.net to get a copy of this message
I am planning to use HTML_QuickForm_Controller and I have found something strange, so I wanted to check if anyone had already witnessed the same. Started with the wizard.php sample at http://pear.php.net/package/HTML_QuickForm_Controller/docs/latest/__filesource/fsource_HTML_QuickForm_Controller__HTML_QuickForm_Controller-1.0.9exampleswizard.php.html and replicated as it is on my test environment. When on page 2 of 3 of the multipage form, after filling with text the text fields and pressing Enter on the keyboard (instead of clicking the Submit button) I am redirected to page 1 and not to page 3 as expected. This should be handled by line 79: $this->setDefaultAction('next'); which appears to be ok. The strange abovementioned behaviour should instead be produced by: $this->setDefaultAction('back'); Both 'next' and 'back' seem valid names of buttons created a few lines earlier. Substituting it with $this->setDefaultAction('doesntexist'); produces the same 'back to page 1' result. Thank you in advance. Mario

« previous php.pear.general (#29257) next »