By mikewheaton on
How would I go about creating an override to change the HTML output for the 'Post new comment' form?
I want to resize the input box and remove/reword the text below that describes web addresses, HTML tags, etc. I know that this could be accomplished through the use of CSS (for resizing the input box) and the String Override module to change/remove the text, but I'd prefer to get right in there and change the HTML output. I'm hoping to learn from this example so that I can then modify more forms, but of course without touching the core.
Comments
Learning a little FAPI
Learning a little FAPI can get you a long way towards form nirvana. :-) I wrote an introductory article about how to get in there and monkey with forms at http://www.lullabot.com/articles/modifying-forms-5-and-6.
Lullabot loves you | Be a Ninja, join the Drupal Dojo
Drupalize.Me, The best Drupal training, available all the time, anywhere!
Thanks very much, I'll have
Thanks very much, I'll have a look at that. :)
The tutorial was great and I
The tutorial was great and I had no problems modifying the user_edit form. However, I've been unable to make similar changes to the new comment form. Using Firebug I found that the form is "comment_form" and I added the following to template.php:
The dsm() is displaying output, so the function must be named correctly. ['account']['name']['#title'] is based on the following piece of output from the dsm() call:
I've tried various other fields on this form with no luck as well. What is it I'm doing wrong here?
Clear the cache
I've found that in D6 when I have weird stuff happening with anything related to display that clearing the cache helps most of the time. Administer > Site configuration > Performance
Lullabot loves you | Be a Ninja, join the Drupal Dojo
Drupalize.Me, The best Drupal training, available all the time, anywhere!
I'm actually using Drupal 5,
I'm actually using Drupal 5, and I have caching disabled under Site Configuration > Performance. I've also made sure I cleared the browser cache, restarted the WAMP server, etc. I've gone over that syntax and looked at the dsm() output of the arrays many times and don't see where my error is. Any thoughts for what I should try next?