drupaldrupal-6drupal-contact-form

contact us module success workflow


I am using site-wide contact Us form, but when user click "send email" submit button, the workflow automatically take the user to home page, without showing any sort of message, which could be very inconvenient for end user.

But in case user did not supply subject or other mistake, than it is properly reported. How can we show 'message successfully submitted' message?

Also, how can we change "send email" submit button text to "send message"?


Solution

  • Have a look at the blog post here: http://www.isegura.es/blog/modifying-contact-form-drupal-how-add-field

    You need to implement hook_form_alter() as described there, then you can override the submit text. I suggest you install devel.module and then use dpm($form) to see how that form is built or have a look at http://api.drupal.org/api/drupal/modules--contact--contact.pages.inc/function/contact_mail_page/6.

    Something like this should do the trick:

    $form['submit']['#value'] = t('Send message');
    

    To print a message, you can add your own submit callback to that array and then print a message there.