We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    Quote from: sinbad at Mar 15, 2008, 07:31 PM

    just create another snippet to display each form randomly so you can use both smiley


    LOL. In my case that would be the proverbial biting off more than I can chew...
      • 3749
      • 24,544 Posts
      Quote from: sinbad at Mar 15, 2008, 07:31 PM

      just create another snippet to display each form randomly so you can use both smiley


      Or add in SPForm and rotate between three separate contact forms. wink

      Here’s the code (untested) assuming that you have three different contact forms. Just call this snippet on blank page and it will forward to one of the three:

      <?php
      
      //Assuming that your three contact pages are 3, 7, and 8
      
      
      $num = rand(1,3);
      
      switch ($num) {
      
          case 1:
              $newPage = 3;
              break;
          case 2:
              $newPage = 7;
              break;
      
          case 3:
              $newPage = 8;
              break;
      
      }
      
      $modx->sendForward ($newPage);
      
      ?>


      Bob
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting