[dev] Weather block; need advice/help
Chuck Hagenbuch
chuck at horde.org
Mon Jan 12 09:20:10 PST 2004
Quoting Rick Emery <rick at emery.homelinux.net>:
> The pear Services_Weather module searches for the location ID by receiving a
> location string (for example, "Sanford, FL") and querying the web service. It
> returns either a) a pear error if the location isn't found, b) a string
> containing the ID of the location, or c) an array of possible matches.
[snip]
> It would be great if there were a way to query Services_Weather with the
> location, evaluate the return, and present appropriate feedback to the user
> while still inside the layout.
The ideal thing would be to use Horde_Form validation to mark the form as
invalid if the location isn't an exact match (validate the location when the
params are saved). Either say completely not found, or present the list of
possible matches, and only consider the form valid once you get a match.
-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