Hi Radek<br>Did change name in theme function to 'yourtheme' name it will be<br>function yourthemename_theme().....<br>and later<br><font face="Courier New, monospace"><font style="font-size:9pt" size="2">function yourthemename_contact_site_form($variables) {</font></font>....<br>
<br>I only had problems with <font face="Courier New, monospace"><font style="font-size:9pt" size="2"> hide($variables['form']['subject']); drupal reported it as mandatory.<br><br><br>And ALWAYS clear chache ( even twice ). It doesn't matter Linux or Windows as far as http server is set up corectly<br>
</font></font><br><div class="gmail_quote">On Mon, Sep 24, 2012 at 10:49 AM, Radek <span dir="ltr"><<a href="mailto:mtrener@gmail.com" target="_blank">mtrener@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
the code below doesn't seem to work. I've copied it from DGD7 book
for learning purposes. I placed it in template.php in my custom
theme directory, but nothing changes to the contact-site-form. I'm
working on Linux (Ubuntu). I don't understand what's wrong either
with the code or approach.<br>
<p style="margin-bottom:0cm;background:#ccffff" align="LEFT">
<font face="Courier New, monospace"><font face="Courier New,
monospace"><?php<br>
<font style="font-size:9pt" size="2">/**<br>
*
Implements hook_theme().<br>
*/</font></font><font style="font-size:9pt" size="2"><br>
function
dgd7_theme() {<br>
return
array(<br>
'contact_site_form'
=> array(<br>
'render
element' => 'form',<br>
),<br>
);<br>
}</font></font></p>
<p style="margin-bottom:0cm;background:#ccffff">
<font face="Courier New, monospace"><font face="Courier New,
monospace"><font style="font-size:9pt" size="2">/**<br>
*
Implements theme_forms_contact_site_form().<br>
*/</font></font><font style="font-size:9pt" size="2"><br>
function
dgd7_contact_site_form($variables) {</font><font face="Courier
New, monospace"><font style="font-size:9pt" size="2"> <br>
//
Hide the subject field. It's not required.</font></font><font style="font-size:9pt" size="2"><br>
hide($variables['form']['subject']);<font color="#008000"><br>
//
Change the labels of the "name" and "mail"
textfields.</font><br>
$variables['form']['name']['#title']
= t('Name');<br>
$variables['form']['mail']['#title']
= t('E-mail');<font color="#008000"><br>
//
Create output any way you want.</font><br>
$output
= '<div class="something">';<br>
$output
.= '<p class="note">'. t("We'd love hear from
you. Expect to hear back from us in 1-2 business days.")
.'</p>';<br>
$output
.= render($variables['form']['name']);<br>
$output
.= render($variables['form']['mail']);<br>
$output
.= '</div>';<font color="#008000"><br>
//
Be sure to include a rendered version of the remaining form
items.</font><br>
$output
.= drupal_render_children($variables['form']);<font color="#008000"><br>
//
Return the output.</font><br>
return
$output;</font></font><font face="Courier New, monospace"><font style="font-size:9pt" size="2"><br>
}<br>
</font></font></p>
<p style="margin-bottom:0cm;background:#ccffff"><font face="Courier New, monospace"><font style="font-size:9pt" size="2">Mark_owsky<br>
</font></font></p>
</div>
<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br>