Re: extending DataObjectFormBuilder will not work
| From: | Justin Patrin | Date: | Thu, 28 Oct 2004 16:01:23 +0000 |
| Subject: | Re: extending DataObjectFormBuilder will not work | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15190@lists.php.net to get a copy of this message | ||
On Thu, 28 Oct 2004 10:33:38 +0200, Alexander Petri <alex.petri@gmx.de> wrote:
> Justin Patrin wrote:
>
>
>
> > On Wed, 27 Oct 2004 19:42:36 +0200, Alexander Petri <alex.petri@gmx.de> wrote:
> >
> >>yes i have it from the documentation...
> >>but i didnt understand you really
> >>
> >>all what i want is to switch between specific forms for the
> >>Dataobject...
> >>
> >>in Form one.. i only would change the password
> >>in the second the "normal" userdata...
> >>
> >>is this possible? it would be cool to use different classes for that...
> >>
> >
> >
> > Are you trying to have different options for different tables or will
> > these be re-used for multiple tables?
> >
>
> its all for one Dataobject(Table):
> its a user table with username,password,realname,adress ....and so on
> so a user has to register..
> and then if the user would change the data, i want him to
> change the password and normal data in different forms
> i guess this makes sense
>
Ok, then try this:
$options = array('createSubmit' => false, 'submitText' =>
'Hallo',
'formHeaderText' = 'Texttesttest');
$fb = DB_DataObject_FormBuilder::create($do, $options);
or, if you *really* want to extend the class:
require_once('DB/DataObject/FormBuilder/QuickForm.php');
class userForm extends DB_DataObject_FormBuilder_QuickForm
{
var $createSubmit=false;
var $submitText='Hallo';
var $formHeaderText = 'Testtetetet';
}
$fb = new userForm($do);
--
paperCrane --Justin Patrin--