previousHTML_QuickForm_Renderer_Default::
clearAllTemplates()
(Previous)
(Next) HTML_QuickForm_Renderer_Default::
setFormTemplate()
next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

HTML_QuickForm_Renderer_Default::setElementTemplate()

HTML_QuickForm_Renderer_Default::setElementTemplate() – Définit le template d'un élément

Synopsis

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

void HTML_QuickForm_Renderer_Default::setElementTemplate ( string $html , string $element = = null )

Description

Définit le template d'un élément. Lorsqu'appelé avec un paramètre, il définit le template par défaut de l'élément, lorsqu'appelé avec deux paramètres, il définit le template concrètement pour l'élément. Le template doit inclure au moins un marqueur {element}.

Le template par défaut de l'élément est :


"\n\t<tr>\n\t\t<td align=\"right\" valign=\"top\"><!-- BEGIN required --><span style=\"color: #ff0000\">*</span><!-- END required --><b>{label}</b></td>\n\t\t<td valign=\"top\" align=\"left\"><!-- BEGIN error --><span style=\"color: #ff0000\">{error}</span><br /><!-- END error -->\t{element}</td>\n\t</tr>"

Parameter

string $html

Le HTML entourant un élément

string $element

(optionnel) Nom de l'élément pour lequel on applique le template

Throws

No exceptions thrown.

Note

This function can not be called statically.

previousHTML_QuickForm_Renderer_Default::
clearAllTemplates()
(Previous)
(Next) HTML_QuickForm_Renderer_Default::
setFormTemplate()
next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.