We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11563
    • 4 Posts
    Hi,

    I am using an eForm that contains a
    <input type="hidden" name="pagetitle" value="[*pagetitle*]" eform="::0::">
    field which is populated with a template variable. This passes on to the respective chunks ok. The problem is that I have to use a separate thank you page (using &gotoid) because the form is at the bottom of a lot of text and jumps back to the top after submitting. The template variables are not preserved and I tried to call &gotoid=’22&myVar="foo"’ but that doesn’t work.

    Questions:

    - Is there a way to display the thank you message at the top of the page? I don’t want to put the page content in the form chunk tough, it has to be kept editable by the user.

    - Is there a way to pass the template variable on the next document on form submission?

    Thank You!
      • 17851
      • 213 Posts
      I’m trying to do a similar thing. I have a page with information about a piece of property on it. A user can click a link that takes them to a contact form where they can receive more info about that property. I’m trying to pass the property name/ID from the first page to contact (as you would do with a POST or GET). I know that I can reuse input variables from the first page if I use the eForm "thankyou" chunk, but I need to use the "gotoid" to send it to the page with the contact form info. What’s the best way to pass a form value to another page?
        Mark Macatee
        President
        Power 10 Solutions
        http://www.power10solutions.com
        • 5340
        • 1,624 Posts
        why don’t you use session?
          • 17851
          • 213 Posts
          How would I store the parm in the session? I know how this is done in PHP, but what MODx mechanism would be used for handling the form var being passed?
            Mark Macatee
            President
            Power 10 Solutions
            http://www.power10solutions.com
            • 5340
            • 1,624 Posts
            Use whatever you want. You do not need a modx mechanism. I don’t think modx has one for sessions.

            Use one of the eForm events and just set your session $_SESSION[’your-session-name’] = ’your value’;
            Then you read this in your thank you page.
              • 30319
              • 406 Posts
              Would someone please post an example of how this is done??

              Thank you, Tom