We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34459
    • 134 Posts
    Is it possible to pass values from a link to a form? I have a page with four different links and they all supposed to redirect to a form. Each on of them should have a different value and based on that show a different(in content) dropbox.? any ideas?
      Check out blackflow.pl
      • 14951
      • 151 Posts
      I'm not the best at this stuff, but the way I've approached this in the pass is by adding parameters to the link as follows:
      <a href="[[~id? &param1=`apples` &param2=`bananas`]]">Link1</a>


      Then you can retrieve the values from $_GET to use them in your prehook.

      If anyone has a better approach...I'm all ears..because I'd love to know of one myself!

      Hope this helps,
      -Jared
        • 14951
        • 151 Posts
        I just thought of a much better way to do this...

        I'm an idiot for not thinking of this earlier..

        Just add custom params to your Formit call and access them via:
        $customParam=$scriptProperties['customParam'];


        If you have multiple formit calls on the same page... This does seem to bug out and fill in EVERY form with the last item you loop through (if in a loop).

        Now I wonder if there is anyway to establish an id per formit call to avoid this?