HTML_QuickForm_Renderer_Default

HTML_QuickForm_Renderer_Default – Default renderer

Description

This renderer directly generates and outputs form HTML. It is based on pre-3.0 built-in form output logic.

The renderer has built-in templates for elements, their format is similar to that of HTML_Template_Sigma or HTML_Template_IT (but only placeholders and blocks are supported). When renderer's renderSomething() method is called, it finds the template for the element, makes necessary substitutions and appends the result to the form's HTML.

Usage example

It is recommended to use the Default renderer when you are not using any template engine in your application or do not need to do any customization to form output. It is the fastest way to output a form.

Default renderer usage

<?php
require_once 'HTML/QuickForm/Renderer/Default.php';

$renderer =& new HTML_QuickForm_Renderer_Default();
$form->accept($renderer);

echo 
$renderer->toHtml();
?>

HTML_QuickForm::toHtml() method uses the Default renderer internally.

How to output the form (Previous) Clears all templates (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:

There are no user contributed notes for this page.