2


I am setting up a website using drupal 6 and trying to be minimalistic. I use contact form, and it works pretty well. Once the message is sent, it is redirected to the front page of my site with a message "Your message has been sent.".(with a div messages status). How can one change it like,

  1. customize the message content
  2. instead of redirecting to the home page, display a node (another page)

thanks for any suggestion.

apaderno
  • 28,547
  • 16
  • 75
  • 90
bsr
  • 57,282
  • 86
  • 216
  • 316

2 Answers2

2

For more advanced forms and customisation like you mention above, you should try webform. Webform has the ability to redirect a successful submission to another URL and have a custom status message as well.

wiifm
  • 3,787
  • 1
  • 21
  • 23
1
  1. Change the string for the message. To do that, you can either turn on the locale.module or get string overrides module.
  2. You can create a small custom module to redirect the user using the #redirect property of the Forms API. See here for an example (and check the comments for potential issues).

Alternatively, consider using one of these modules:

Node Destination

Custom (Form) Destination

Rules

Page manager redirect

friendlydrupal
  • 601
  • 5
  • 8
  • thanks for ur suggestions... I think webform makes it way easier, as I could do all of it with just one module. – bsr Nov 14 '10 at 01:05