3

I'm building a site and it has a contact page . the contact page uses contact module and it has some basic forms , what I want is to add some simple text like my personal email and phone number and ... to this page , but I couldn't find a way to do it . I'll be appreciated if you can help me with this thanks

//--------------------------------------------------
finally found the answer! I made a file named "page--contact.tpl.php" and from there after

<?php print $feed_icons; ?>

I just wrote whatever information I wanted and it worked!

apaderno
  • 28,547
  • 16
  • 75
  • 90
m0j1
  • 165
  • 1
  • 7
  • 18

3 Answers3

4

My suggestion ditch the contact form and go for Webforms You will thank me in the long run.

Gokul N K
  • 2,428
  • 2
  • 32
  • 40
  • It has an option to send the mails to multiple people. And list the submissions and so on. – Gokul N K Mar 26 '11 at 16:31
  • yeah , I've seen others telling me that , but it's like a challenge for me (not a big one) to do this , I really wanna learn drupal – m0j1 Mar 26 '11 at 16:45
  • Webform is a breeze. Not much learning cureve involved for basic functionalities. Most of the stuff can be done from admin interface :) – Gokul N K Mar 27 '11 at 10:18
4

You can also create a block, add it above or below the form, then add your information to it. Simplest solution if you all you need is an area to add some details.

mlangfeld
  • 226
  • 1
  • 3
1

You can implement hook_form_alter() and then you can do whatever you want with the contact form.

See http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6 and http://www.metaltoad.com/blog/how-add-field-drupal-contact-form

Berdir
  • 6,881
  • 2
  • 26
  • 38
  • it's an hour me tryin to find how this hook_form_alter() works! – m0j1 Mar 26 '11 at 16:45
  • And? hook_form_alter() will allow you to change every single form in Drupal. That hook alone is one of the most flexible features that Drupal has to offer. So an hour learning that is well well spent time... – Berdir Mar 26 '11 at 16:49
  • of course,learning or trying to learn always worth the time ,I think I finally understood hool_form_alter() , but I want to add just some text to the end of my contact module , and hook_form_alter() as far as I understood it , only modifies the existing fields . – m0j1 Mar 26 '11 at 20:07
  • hook_form_alter() allows to change forms, including adding new fields. See the links I posted above. You can add text by adding a new element with type value and then set '#value' to whatever you want. – Berdir Mar 26 '11 at 20:53