We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10152
    • 156 Posts
    Hello, i have built a formulary in three pages (that use the same template).

    For example :
    Page 1 : fill your age and your general appearance
    Page 2 : fill your personnal informations : country, city, job...
    Page 3 : congratulations, your account is registered !

    I would like that the page 2 uses another template, but as the form is on one single page that only refreshes; i have no idea how to do that with modx.

    Is it possible at least ?

    Cheers
      • 10152
      • 156 Posts
      I’ve set a snippet before and after the content.
      Before content :
      if ($_POST[action]!="action1"){
      echo '
      <div id="page">
      <div id="header">
      	<h1><a href="[~[(site_start)]~]" title="[(site_name)]"></a></h1>
      </div>';
      }else{
         echo'<div id="second_template"></div>';
      }
      


      After content :
      if ($_POST[action]!="action1"){
         echo '</div>';
      }else{
         echo'';
      }