1

function _MY_MODULE_custom_submit($form, &$form_state) { $form_state['redirect'] = url('thank-you', array('absolute' => true)); }

1
  • Can you be more descriptive, providing module details, screenshots etc ? Commented Apr 4, 2015 at 11:20

1 Answer 1

0

If what you want is to do a redirect to a thank you page after you handle your form posted data then just add to your function a redirect via a call drupal_goto().

Something like this:

function _MY_MODULE_custom_submit($form, &$form_state) {
  // process your form stuff...
  drupal_goto('thank-you');  // redirect to page 'thank-you' providing this is one of your drupal pages
}
1
  • when u login u will get a message tag like "You have 16 unread messages" while clicking on it will redirect to /message . form der i want to change url./something @rtome
    – ravi theja
    Commented Apr 6, 2015 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.