again CustomForms on DO
| From: | Alexander Petri | Date: | Mon, 01 Nov 2004 15:16:49 +0000 |
| Subject: | again CustomForms on DO | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15274@lists.php.net to get a copy of this message | ||
now i have this code:
$form =& $user->getCustomForm();
$builder = & DB_DataObject_FormBuilder::create($user);
$builder->useForm($form);
$form =& $builder->getForm();
if($form->validate()){
$form->process(array(&$builder,'processForm'),false);
}else{
require_once 'HTML/QuickForm/Renderer/Array.php';
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
$form->accept($renderer);
$smarty->assign('form', $renderer->toArray());
}
it renders and fills my CustomForm with data
but in the line
$builder = & DB_DataObject_FormBuilder::create($user);
i create the "normal Form again"...
but how can i change this line so that i can only one Form
another point is that my customForm dindnt get data from
my datetime field [birthday]
thanks for help