<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Arial">Now I'm running into this problem on
a different site.&nbsp; My module where hook_form_alter() has a weight of
999, so there should be nothing overriding it in the system table.&nbsp; In
this case I'm just trying to modify the value of the #weight property
for the form buttons.&nbsp; If I display the values in $form using dsm()
after making the changes, the changed values are there, but they are
not rendered on the screen.&nbsp; Any other ideas?&nbsp; I'm starting to pull out
what's left of my hair.<br>
<br>
Thanks.<br>
<br>
Steve<br>
</font></font><br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
 cellspacing="0">
  <tbody>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Subject: </th>
      <td>Re: [support] hook_form_alter() data changed in array but not
on screen</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Date: </th>
      <td>Wed, 17 Jun 2009 12:20:24 -0700</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">From: </th>
      <td>Steve Edwards <a class="moz-txt-link-rfc2396E" href="mailto:killshot91@comcast.net">&lt;killshot91@comcast.net&gt;</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">To: </th>
      <td><a class="moz-txt-link-abbreviated" href="mailto:support@drupal.org">support@drupal.org</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">References: </th>
      <td><a class="moz-txt-link-rfc2396E" href="mailto:4A387EB5.4040203@comcast.net">&lt;4A387EB5.4040203@comcast.net&gt;</a>
<a class="moz-txt-link-rfc2396E" href="mailto:4A38D820.7010903@earthlink.net">&lt;4A38D820.7010903@earthlink.net&gt;</a>
<a class="moz-txt-link-rfc2396E" href="mailto:4A3926D5.1020905@comcast.net">&lt;4A3926D5.1020905@comcast.net&gt;</a>
<a class="moz-txt-link-rfc2396E" href="mailto:4A392961.7040904@funnymonkey.com">&lt;4A392961.7040904@funnymonkey.com&gt;</a></td>
    </tr>
  </tbody>
</table>
<br>
<br>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<font size="-1"><font face="Arial">I had actually already done this.&nbsp;
I'm using uc_node_checkout, and the module weight for it in the system
table is 100, so I set mine to 999.&nbsp; Mine is the highest weight in the
table.<br>
<br>
Steve<br>
</font></font><br>
Marc Poris wrote:
<blockquote cite="mid:4A392961.7040904@funnymonkey.com" type="cite">Some
other module is probably having its hook_form_alter() come after
yours.&nbsp; Try setting your module's weight greater than all other modules
and/or rename your module so it comes later alphabetically. <br>
  <br>
  <br>
Steve Edwards wrote: <br>
  <blockquote type="cite">Thanks for the suggestion.&nbsp; Yes, it is
&amp;$form.&nbsp; As I stated below, I'm already modifying other forms in
the same function, and they are working fine. <br>
    <br>
Steve <br>
    <br>
Jamie Holly wrote: <br>
    <blockquote type="cite">Are you sure you have &amp;$form and not
just $form in your function declaration? I've had the same problem
before and pulled my hair out just to realize I forgot the &amp;. <br>
      <br>
Jamie Holly <br>
      <br>
      <br>
      <br>
      <br>
Steve Edwards wrote: <br>
      <blockquote type="cite">I'm trying to use hook_form_alter() to
write data to a text field when the form is first displayed, but for
some reason I can't get the values to display on the form itself.&nbsp; I
know I have the right form_id, because dsm() displays all the data for
that form.&nbsp; What's even weirder is that I can see the data being
changed in the form itself, but it just won't change on the screen.&nbsp; I
can also change the weight of the field
($form['field_class_name']['#weight']=99;) <br>
and it relocates the position of the field on the screen accordingly.&nbsp;
But when, for instance, I change the #title and #description of the
field, the changes are changed in the arrary itself (I can see this by
putting a dsm() after changing the data), but the values on the screen
don't change.&nbsp; I'm making similar changes to other forms within the
same hook function (different case statements), and they all work
fine.&nbsp; I've cleared all my caches (Drupal and browser), but to no
avail.&nbsp; Can anyone tell me why my form data isn't changing? <br>
        <br>
Thanks. <br>
        <br>
Steve <br>
        <br>
      </blockquote>
    </blockquote>
  </blockquote>
  <br>
  <br>
-- <br>
[ Drupal support list | <a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="http://lists.drupal.org/">http://lists.drupal.org/</a>
] <br>
  <br>
</blockquote>
</body>
</html>