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.