We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36112
    • 24 Posts
    Anyone have good way to do this? I have a link on each of my product's pages (resources) that is something like "Contact me about this product"

    How can I create, when this link is clicked, it goes to a form, but fills in the form "title" with my product name/code automaticly.

    Any help appreciated! Using latest revo
      • 4172
      • 5,888 Posts
      you can create a formit-prehook with something like that:

      if (isset($_GET['resTitle'])){
      
              $hook->setValue('title',$_GET['resTitle']);
          }
      return true;
      


      then you can use it in your form with
      [[+fi.title]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36112
        • 24 Posts
        Hmm I see.. I've never used prehooks before, not sure how I can do this..

        I created the snippet:
        if (isset($_GET['resTitle'])){
         
                $hook->setValue('title',$_GET['resTitle']);
            }
        return true;


        Then added
         [[+fi.title]]
        to the form input..

        How to I make the "title" get the title I want? hehe, I want it to get the product title from the
        [[*pagetitle]]
        on the particular page the link to the form is in.

        Hope you understand what I mean, thanks for the quick reply!