[dev] Template or RENDERER for dynamic forms?

Chuck Hagenbuch chuck at horde.org
Thu Dec 8 18:34:47 PST 2005


Quoting Robin Rainton <robin at rainton.com>:

> That seems awfully complicated, so guess I'm asking, what's the  
> right way to do that, "Not enough? Add your own ones." step?

Just pass some extra params to the form renderer. This example is from  
Giapeto:

$params = array('varrenderer_driver' => array('giapeto', 'blockedit_html'));
$renderer = &new Horde_Form_Renderer($params);

So replace giapeto with your application's name, and blockedit_html  
with whatever renderer you put in your app/lib/UI/VarRenderer/. Extend  
the renderer, and add whatever types you want.

Not the absolute best solution since you can't add multiple renderers  
this way unless you chain them with class extension, but it works.

-chuck

-- 
"So we're talking near-sonic speeds for a vegetable."
Reasons to go to the Punkin Chunkin World Championships


More information about the dev mailing list