开发者

Drupal : customize status messages (of contact form)

开发者 https://www.devze.com 2023-01-24 17:46 出处:网络
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 me

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.


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.


  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

0

精彩评论

暂无评论...
验证码 换一张
取 消