Class Summary HTML_QuickForm_Action_Display

Class Summary HTML_QuickForm_Action_Display – This action handles the output of the form.

Description

If you want to customize the form display, subclass this class and override the _renderForm() method, you don't need to change the perform() method itself.

Class Trees for HTML_QuickForm_Action_Display

This action allows to go to a specific page of a multipage form. (Previous) The action handles the HTTP redirect to a specific page. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

Note by: ayourk@gmail.com
Here is something I believe would be helpful to many people using Smarty in combination with HTML_QuickForm_Controller:

require_once("smarty/Smarty.class.php");
require_once("HTML/QuickForm.php");
require_once("HTML/QuickForm/Renderer/ArraySmarty.php");
require_once("HTML/QuickForm/Controller.php");
require_once("HTML/QuickForm/Action/Display.php");


class Smarty_Form extends HTML_QuickForm_Action_Display {
var $page;
var $smarty;

function _renderForm(&$page) {
$renderer =& new HTML_QuickForm_Renderer_ArraySmarty($this->smarty);
$this->page =& $page;
$this->page->accept($renderer);

// Finally assign the form data to "myquickform"
$this->smarty->assign('myquickform', $renderer->toArray());
}
function setSmarty(&$smarty) {
$this->smarty = $smarty;
}
}