[dev] Weather block; need advice/help

Chuck Hagenbuch chuck at horde.org
Thu Jan 15 20:13:36 PST 2004


Quoting Rick Emery <rick at emery.homelinux.net>:

> I added a new type to Form.php (Horde_Form_Type_weather). I basically just
> copied the one for text, and changed the "isValid" function to meet my needs.
> (sends the value to weather.com and receives a PEAR error, an array, or the
> location ID).
>
> I thought I might be lucky enough to simply change the "type" in the params
> array of the block from "text" to "weather", but that didn't work; in the
> layout for the block, I no longer get a textbox into which to type the
> location.

You need to modify Horde_Form_Renderer so that it knows how to render your new
type. That should be it. :)

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"Here, I brought some cole slaw. It's made from peeeooople! Just kidding."


More information about the dev mailing list