A problem with QuickForm

From: Date: Sat, 05 Jun 2004 12:12:34 +0000
Subject: A problem with QuickForm
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12926@lists.php.net to get a copy of this message
Hi, I am trying to generate forms from a database using QuickForm. I intend reading the form definition from the database and store it in an array and use call_user_func_array to pass the definition to the addElement method. I tried the following sample code, but it doesn't seem to work: $defnArray = array(button','ibtnTest','Test Button'); $methodVariable = array( $form, 'addElement' ); call_user_func_array($methodVariable,$defnArray); I was trying this out with the elements.php sample provided in the quickform distribution. However the following code displays the button in the form: $form->addElement('button','ibtnTest','Test Button'); I would appreciate it if someone could tell me where I am going wrong. Or perhaps there is another approach to generating forms from a database using QuickForms. Best Regards Feroze =========================== Jar Jar Binks will be Jedi! ===========================

« previous php.pear.general (#12926) next »