Re: [Phplib-users] PHP Notice: oohforms
Brought to you by:
nhruby,
richardarcher
From: Frank B. <fb...@sy...> - 2005-01-08 15:23:07
|
At 07:38 AM 11/18/04, Frank Bax wrote: >At 11:38 AM 11/17/04, Jeremy Weathers wrote: > >>Quoth Frank Bax: >> >> > > > PHP Notice: Undefined index: Kill - line 21 >> > > >> > >I can't find this in the oohforms files - this might be in your code. >> > >> > >> > Sorry, missed this sentence yesterday. It's definitely inside >> > oohforms.inc - my form has several "submit" buttons - one each for >> > "Add", "Chg", "Del". Whenever one of them is clicked, I get the >> > above error for each of the form elements where type="submit", except >> > the one that was clicked. >> >> >>So, in the case you originally reported, the name of the submit button that >>caused the error was "Kill"? I'll take a peak and see if I can find the >>problem. > > >Yes, that's the "name" of one of the submit buttons. Never mind. I looked at my code a little closer as I cloned it for a new form this week. It seems I didn't know anything about classes at the time of coding the original. When I converted: function FormOne( &$f, $oid ) { $f->add_element(array( 'type' => 'hidden', 'name' => 'oid', 'value' => $oid, ) ); } $f = FormOne(new form, $f, $oid); to: class FormOne extends form { function FormOne( $oid ) { $this->add_element(array( 'type' => 'hidden', 'name' => 'oid', 'value' => $oid ) ); } } $f = new FormOne( $oid ); The problems at line 21 of oohforms.inc disappeared. Frank |