Look at '#weight'<br><br><div class="gmail_quote">On Sun, Sep 6, 2009 at 6:54 PM, Jeff Greenberg <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></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>