<div dir="ltr">Ah, right! Thanks. So for the buttons, I really wanted to do:<div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">        $form[&#39;actions&#39;][&#39;submit&#39;] = t(&#39;Post comment&#39;);</div>
<div style="font-family:arial,sans-serif;font-size:13px">        unset($form[&#39;actions&#39;][&#39;preview&#39;]);</div><div style="font-family:arial,sans-serif;font-size:13px"> </div></div><div style="font-family:arial,sans-serif;font-size:13px">
But what also is revealed is that the title <b>Add new comment</b> is not part of the form. I&#39;d appreciate any idea regarding overriding its value. I tried using content: xxx in css, but while I can get the new value to appear doing that, I can&#39;t seem to hide the original one without hiding both.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 1, 2013 at 3:30 PM, berliner <span dir="ltr">&lt;<a href="mailto:myberliner@gmail.com" target="_blank">myberliner@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What you did was to alter the node object that was passed into the form builder as an argument.<br>
Instead var_dump the entire $form array and look for keys that do not start with a dash. Those are the ones that will finally be rendered. Keys starting with a dash control how they are rendered.<br>
Take a look at the examples in the docs: <a href="https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_alter/7" target="_blank">https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_alter/7</a><br>

<br>
best regards,<br>
berliner<br>
<br>
Am 01.11.2013 um 19:34 schrieb Jeff Greenberg &lt;<a href="mailto:listmail.ayendesigns@gmail.com">listmail.ayendesigns@gmail.com</a>&gt;:<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; I have the following code in my module:<br>
&gt;<br>
&gt;     function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {<br>
&gt;       if ($form_id == &#39;comment_node_blog_form&#39;) {<br>
&gt;         $form[&#39;#node&#39;]-&gt;content[&#39;links&#39;][&#39;comment&#39;][&#39;#links&#39;][&#39;comment-add&#39;][&#39;title&#39;] = t(&#39;Post a comment&#39;);<br>
&gt;         $form[&#39;#node&#39;]-&gt;actions[&#39;submit&#39;] = t(&#39;Post comment&#39;);<br>
&gt;         unset($form[&#39;#node&#39;]-&gt;actions[&#39;preview&#39;]);<br>
&gt;     var_dump($form);<br>
&gt;   }<br>
&gt;<br>
&gt; When I look at the var_dump, the form fields are set as intended. However, in looking at the form, the title still has &quot;Add new comment&quot;, the submit button is unchanged, and the preview button is still present.<br>

&gt;<br>
&gt; In searching the page content (including the var_dump output) the ONLY place &#39;Add&#39; exists is in the text of the form ... NOT in the content of the var_dump. The only way I can see that happening is if the form array is being changed back after my hook, so I tried changing the module weight to 99 (via mysql) and clearing cache. No difference.<br>

&gt;<br>
&gt;<br>
&gt; --<br>
&gt; ---<br>
&gt; <a href="http://drupal.org/user/367108" target="_blank">drupal.org/user/367108</a><br>
&gt; <a href="http://linkedin.com/in/jeffrgreenberg" target="_blank">linkedin.com/in/jeffrgreenberg</a><br>
&gt; <a href="http://accidentalcoder.com" target="_blank">accidentalcoder.com</a> / <a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a><br>
&gt; @accidentalcoder<br>
</div></div><span class="HOEnZb"><font color="#888888">&gt; --<br>
&gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>---<div><a href="http://drupal.org/user/367108" target="_blank">drupal.org/user/367108</a></div><div><a href="http://linkedin.com/in/jeffrgreenberg" target="_blank">linkedin.com/in/jeffrgreenberg</a></div>
<div><a href="http://accidentalcoder.com" target="_blank">accidentalcoder.com</a> / <a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a></div><div>@accidentalcoder</div>
</div>