Re: Re[2]: [PEAR] denotes required field
| From: | Justin Patrin | Date: | Wed, 08 Sep 2004 16:38:01 +0000 |
| Subject: | Re: Re[2]: [PEAR] denotes required field | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14456@lists.php.net to get a copy of this message | ||
Please send responses back to the list so others can help and see
solutions as well. Responses in-line below.
On Wed, 8 Sep 2004 16:39:45 +0200, Leo Márquez <leo@calidae.net> wrote:
> Hi!
> Thanks for your answer. I has readed that is possible call form
> properties from the dataobject with the fb_ prefix. For example
> $fb_preDefElements. Viewing a renderer example I have seen the
> requiredNote element in the array of data which is passed to the
> template and I thought that I could access it from $fb_requiredNote.
It's the FormBuilder properties that you can set from the DataObject,
not the form properties.
> But reading your message I supose that I can call the setRequiredNote
> method from the preGenerateForm(& $form) method. I have tried it but
> either doesn't work.
preGenerateForm does not have (&$form) as a parameter. It can't as
it's *before* the form is generated. You need to pay more attention to
the documentation.
You could do this with postGenerateForm(&$form) in your DataObject.
function postGenerateForm(&$form) {
$form->setRequiredNote('Required Note');
}
> Changing of subject I want to use the structures_datagrid package but
> the end documentation is not avaible and only with the api is
> difficult to me start working with it.
> Have you any tutorial or can you orient to me?
Not myself, no. First step is to check the PEAR website for docs.
Second, search google. Third, ask the PEAR-General list. Fourth, write
some docs yourself and submit them. ;-)
>
> Thanks a lot.
>
> Tuesday, September 7, 2004, 7:35:51 PM, vas escriure:
>
> JP> On Tue, 7 Sep 2004 10:51:01 +0200, Leo Márquez <leo@calidae.net> wrote:
> >> Hi!,
> >>
> >> I'm working with DB_DataObject_FormBuilder and I'm trying to change
> >> the required note at the bottom of form. I try it with the attribute
> >> $fb_requiredNote in the dataobject but the required note doesn't
> >> change. I try it too in preGenerate form method modifying the form:
> >> $form->requirednote="something"
> >> But it does not work either.
> >> Surely that something I am making bad but I do not know what.
> >>
>
> JP> I'm not sure why you thought this was configurable through FormBuilder
> JP> as I see no mention of it in the code or in the docs:
> JP>
> JP> http://opensource.21st.de/tiki-index.php?page=Formbuilder+documentation¥!¤7bð0
> JP> êëÖõ}
>
> JP> You should be able to set this in the form through the
> JP> setRequiredNote() function.
> $form->>setRequiredNote('* denotes required');
>
> --
> Salutacions,
>
> Leo Márquez
> [ Enginyeria del software / Internet ]
> [ Calidae - www.calidae.com ]
>
> !DSPAM:413f18c0321975012360109!
>
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--