[horde] Horde_Form class question
Chris St. Pierre
stpierre at NebrWesleyan.edu
Thu Dec 1 11:41:38 PST 2005
I'm trying to write my own Horde module to let end users do some
manipulation of the aliases and virtual files, but I've run into
problems with the Horde form classes. I've got a page set up that's
copied almost verbatim out of Jan's presentation at FOSDEM, but I get
the following error:
Fatal error: Call to a member function on a non-object in
/srv/www/htdocs/horde-3.0.4/lib/Horde/Form.php on line 184
It appears, based on this, that the $_vars member variable of my
Horde_Form instance is null, even though I've added a form element to
it. A snippet of my code follows:
[snip...]
$title = _("Your Mail Aliases");
$variables = &Variables::getDefaultVariables();
$form = &new Horde_Form($vars, 'Your Mail Aliases', 'chooser');
$form->addVariable(_('Test'), 'test', 'text', true);
require ALIASES_TEMPLATES . '/common-header.inc';
require ALIASES_TEMPLATES . '/menu.inc';
$renderer = &$form->getRenderer();
$form->renderActive($renderer, $variables, Horde::selfUrl());
[...snip]
It fails on the call to the renderActive() method. Any ideas what I
might be doing wrong?
Chris St. Pierre
Unix Systems Administrator
Nebraska Wesleyan University
More information about the horde
mailing list