We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4873
    • 11 Posts
    I’m using a heavily modified version of RegisterX in my site (I’ve added the possibility of registration using several user fields; some extra validation; a bit of security)

    Now I need to do the following: I need to insert the content of a placeholder in a redirect page so I can place a result message in a new page. So far I’ve been able to:

    - set the content for a placeholder, i.e:

    $output = $modx->setPlaceholder('msg', $output); // for the placeholder [+msg+]


    - create a redirect page:

    $url = $modx->makeURL($gid); //&gotoid
           $modx->sendRedirect($url);
           return $output;


    - in the redirect page I created a placeholder:

    [+msg+]


    My question is how to make ’travel’ the first (the placeholder content) into the second (the redirect page).

    Anyone knows how to do this, using this method or another one?

    Thanks!
      • 22303 MODX Staff
      • 10,725 Posts
      You would either have to save it to session and grab it and read it on the redirect page, or do the same by passing the message in a GET param to the redirected page and reading it from there. You could even have the page do a POST to the target page rather than a GET.

      Just some possibilities...