By alix on
I'd like to add text to my comment form, first to give some guidance with Captcha (which is always failing users the first time on my setup--until I find a fix I want to warn them) and secondly to specify the URL format, as many don't know to put the http:// on their website link. I am using the phptemplate engine and a customized template that started life as Zen.
Would I do this in the comment.tpl.php file or would I need to override something like hook_form_alter in template.php? Does anyone have an example of how to do this?
Thank you!
Alix
Comments
Override theme function
You can override the theme function that outputs the comment form, namely 'theme_comment_form'.
Place this in your template.php file (if you don't have one for your theme, create one). If you already have a template.php file, first look to see that is not being declared already.
You can replace 'phptemplate' with the name of your theme if you want to.
There may be a themeable function in the captcha module also, it may be more appropriate to add specific help there if you are using it elsewhere, such as a contact form.
www.sitespring.eu
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Thank you!
Thanks, Jeff, this helps me out so much. Now I can develop it from there and have a semblance of a clue.