[Phplib-users] oohForm text element with multiple attribute
Brought to you by:
nhruby,
richardarcher
|
From: Andres B. Z. <aba...@ei...> - 2003-08-25 18:32:02
|
Hello again:
I went into the oohForm class files and I edited the line where a multiple
text field is printed so no more problems with the appended "[]". But I
still have a problem, it is not posible to give different values to the
various instances of a multiple text field. By now, I wonder if I am trying
to do something that oohForm does not offer... Being more especific... Can
oohForm deal with multiple text fields with the same name and different
values?
Thank you very much...
Andres
-----Original Message-----
From: php...@li...
[mailto:php...@li...]On Behalf Of Andres
Barreto Zicare
Sent: Viernes, 22 de Agosto de 2003 12:21 p.m.
To: php...@li...
Subject: [Phplib-users] oohForm text element with multiple attribute
Hello:
In Javascript, if multiple objects on the same form have the same NAME
attribute (eg. <input type=text name=myField> ), an array of the given NAME
(myField) is created automatically. Elements are indexed in source order
starting at 0. So references to document.theForm.myField[0] are valid.
Now, I am using this piece of php code:
for ($i=0;$i<$n;$i++)
{
$f->add_element(array("type"=>"text",
"name"=>"myField",
"multiple"=>1,
"value"=>"$nombre"));
}
And I have found that oohform prints the form elements as: <input
name=myField[] value=''>
The "[]" appended to the element name fools the javascript interpreter so I
cant make reference to the elements.
How can I make oohform to print the element name without the "[]" ?
Thanks
Andres
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Phplib-users mailing list
Php...@li...
https://lists.sourceforge.net/lists/listinfo/phplib-users
|