Re: Re: quickform and ITX
| From: | Julien Tschäppät | Date: | Mon, 08 Aug 2005 11:50:36 +0000 |
| Subject: | Re: Re: quickform and ITX | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20320@lists.php.net to get a copy of this message | ||
Hi,
2005/8/7, Alexey Borzov <borz_off@cs.msu.su>:
> Hi,
>
> Julien Tschäppät wrote:
> > Please.
> > Nobody has the solution ?
>
> The solution is in the docs: only the Default renderer outputs 'html' elements,
> all other renderers ignore them.
>
> You may consider using 'static' elements instead.
>
That works with 'static' element, but I don't think that's a good idee
to put html code in a <label> tag.
But I have another idee. My form have all the same structure :
- one or several elements (text, file, select, checkbox or radio)
- a <div> containing my html code
- and finally a textarea
So I tried to do something like that :
<!-- BEGIN qf_main_loop -->
<!-- BEGIN qf_element -->
<!-- BEGIN qf_element_error --><p
class="formError">{qf_error}</p><!-- END qf_element_error -->
<label<!-- BEGIN qf_element_required --> class="required"<!--
END qf_element_required -->>{qf_label}</label>
{qf_element}<br><br>
<!-- END qf_element -->
{myHtmlCode}
<!-- BEGIN qf_textarea -->
<!-- BEGIN qf_textarea_error --><p
class="formError">{qf_error}</p><!-- END qf_textarea_error -->
<label<!-- BEGIN qf_textarea_required --> class="required"<!--
END qf_element_required -->>{qf_label}</label>
{qf_element}<br><br>
<!-- END qf_textarea -->
{qf_addblock}
<!-- END qf_main_loop -->
{myHtmlCode} is a variable defined with
$tpl->setVariable("myHtmlCode", $someHtmlCode);
that works almost well. just a small problem. The form I tested with
this solution has this structure (in the right order) :
a text element
a file element
my html code
a text area element
and they are displayed in this order :
a text element
my html code
a file element
a text area element
why ?
Julien