Go to the FreeLists Home Page Home Signup Help Login
 



[dokuwiki] || [Date Prev] [04-2008 Date Index] [Date Next] || [Thread Prev] [04-2008 Thread Index] [Thread Next]

[dokuwiki] Re: HTML FORM OUTPUT/INJECTION

  • From: Myron Turner <turnermm02@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 06 Apr 2008 14:06:55 -0500
Andreas Gohr wrote:
On Sat, 05 Apr 2008 09:17:58 -0500
Myron Turner <turnermm02@xxxxxxx> wrote:

I've looked at inc/form.php, as suggested on the DW events list
page. This gives a rudimentary description of how to create a new
Form object but doesn't indicate how to modify an existing form
object.   While PHP doesn't have its own array insert function,
inserts can be done, so it would be possible to insert a new form
element into the _content array of the form object .  But that
doesn't seem to be a nice clean solution to the problem, at least on
the developer' side.

Have a look at the CAPTCHA plugin:

$pos = $event->data->findElementByAttribute('type','submit');
will return the position of the submit button in the form.

$event->data->insertElement($pos++,$out);
then inserts HTML data after that position.

Andi

PS: adding a wiki:devel:forms page would be welcome.

Yes, that's very nice. I replaced my own insertion code with yours. I'll take a closer look at the form object and see if I can come up with some definitions and examples for a wiki:devel:forms page.



--

_____________________
Myron Turner


--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist




[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.