[TYPO3-project-formidable] Enabling/disabling renderlets on runtime
Jerome Schneider
j.schneider at ameos.com
Wed Jan 3 14:17:53 CET 2007
Hello Oliver,
For the moment you can't dynamically create renderlerts at runtime.
But *you can* enable/disable 'em at runtime ;)
This feature is discribed in documentation under
renderlet:* /process (boolean, <userobj>)
This boolean will give you the possibility to tell FORMidable
not to evaluate this renderlet at runtime, meaning that you
will be able to use complex tests to determine if the
application should or not consider this field.
just like this:
<renderlet:TEXT>
<process>
<userobj>
<php><![CDATA[
return (rand(0, 10) > 5) && "THIS WORKS" != "BADLY");
// any test here
// if you need to evaluate form values, use:
//$this->oDataHandler->_getFormData()
// if TRUE returned this renderlet is enabled at runtime
// if FALSE, it's disabled
]]></php>
</userobj>
</process>
</renderlet:TEXT>
You could also use modifiers to do the same but it's easier this way (
and modifiers are not documented for the moment ;)
Happy new year 2007 !!
Jerome Schneider
Oliver Klee a écrit :
> Hi,
>
> in a form, I'd like disable or enable some renderlets based on some TS
> setup configuration. Is it possible to enable or disable some renderlets
> in a form on runtime (or at least hide them on runtime)?
>
> Dynamically creating renderlets on runtime would be great, too.
>
> How do I do this?
>
> Thanks in advance,
>
>
> Oliver
More information about the TYPO3-project-formidable
mailing list