As we are not working with the drupal messages variable, we want to have the confirmation in a different page OR to replace the form. I have been searching through all of the request and always i ended up with a dead end.
I installed rules to see if could do a redirect after a subscribe, but i got stuck providing a mail Data Selector tpye mail.

After that i tried to overwrite lists_block_view in a custom module to check for the $message and then show the message instead of the form, but this would interfere with the error message where the form should be there.

Does anyove have a pointer to have a page for confirmation after a user subscribed?



Joepske’s picture

I managed to set a redirect page with hook_form_alter using

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if($form_id == 'my_form_id') {
    $form['#submit'][] = 'redirect_after_submit';    

function redirect_after_submit($form, &$form_state) {
    $form_state['redirect'] = 'my thank you page';  

But when a user updates his information this function is also called. And then the user sees that a mail has been sent to confirm his emailadress, which is not the case, because it was just updated.

Is there a way to know in this hook if it was an update or confirmation?


gcb’s picture

Component: Documentation » Lists
Category: support » feature
Status: Active » Closed (duplicate)