[dev] Horde Form question

Hamid Sadeghi horde at sadeghi.co.uk
Tue Sep 27 08:21:23 PDT 2005


I have been trying to add a new form type to horde form. My new type 
has an enum field as its parameter. However it does not work (I am 
using latest CVS 15 Sep).

Here is how I do the about :

function about()
    {
        $about = array();
        $about['name'] = _("Report Single Question");
        $about['params'] = array(
            'values' => array('label' => _("Questions"),
                              'type'  => 'stringlist'),
            'data' => array('label' => _("Responses"),
                              'type'  => 'enum',
                              'params'=>array(array('1'=>'1','2'=>'2'))
                              )
        );                        return $about;
    }

Here is the warning:
Warning: Missing argument 1 for init() in 
/usr/share/pear/Horde/Form.php on line 2067

and on the actual display:
Warning: Invalid argument supplied for foreach() in 
/usr/share/pear/Horde/UI/VarRenderer/html.php on line 1296


First of all is this the right place to add the enum field? If yes 
where I am going wrong?


Regards
Hamid



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the dev mailing list