<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body style="direction: ltr;" bgcolor="#ffffff" text="#000000">
<p style="margin-bottom: 0cm; margin-top: 0pt;">Jerad Bitner wrote:<br>
</p>
<blockquote
 cite="mid:215a89c90909061907r3d3d76f1hdc66cea0f2408cc9@mail.gmail.com"
 type="cite">Look at '#weight'<br>
  <br>
  <div class="gmail_quote">On Sun, Sep 6, 2009 at 6:54 PM, Jeff
Greenberg <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'm
hooking hook_form_MY_FORM_ID_alter in order to add additional fields to
the form. The current fields have associative keys ('name', 'mail').
How do I add fields between them? There isn't a PHP call to do an
insert into the middle of an array, and while using array_splice works,
it won't use associative keys. The numeric keys result in the form
looking ok, but when I ask the CAPTCHA module to give me a link on the
form, it puts it right between the first field (associative key) and
the first that I inserted (numeric key), which I think has something to
do with the key problem. Is there an api call I've missed to let me
specify where to add fields, or do I have to rebuild the form array in
order to do it?<br>
    <br>
  </blockquote>
  </div>
  <br>
</blockquote>
Ah, a Blinding Flash of the Obvious! Thanks so much :-)<br>
</body>
</html>