有没有人有这样的例子:Zend Framework Multi Page Form
But for Zend Framework 2 using Zend\Session?
问问题
1768 次
1 回答
6
应该不需要这样的例子,因为这只不过是 Basics 一起玩:
public function multiFormAction()
{
$session = $yourSessionContainer();
if (false === $session->hasStepOneBeenDone()) {
$form = new FormStepOne();
// Check for Post
// Validate Form
// Render Form on Error or Post
// If Valid, safe Form Data into Session
}
if (false === $session->hasStepTwoBeenDone()) {
$form = new FormStepTwo();
// Check for Post
// Validate Form
// Render Form on Error or Post
// If Valid, safe Form Data into Session
}
if (false === $session->hasStepNBeenDone()) {
$form = new FormStepTwo();
// Check for Post
// Validate Form
// Render Form on Error or Post
// If Valid, safe Form Data into Session
}
}
创建它所需要的只是两个主题的知识:
于 2013-08-29T05:36:59.860 回答