We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40088
    • 708 Posts
    Revo 2.4.2
    FormIt 2.2.7

    I'm using FormItRetreiver to display the sender's name in the success message. Works great.

    I'm not redirecting to a separate "success" page but showing the success message inline with the form. Again, works fine.

    FormItRetreiver requires the property
    &store=`1`

    The Problem
    I've noticed when the form is submitted and the page reloads displaying the success message that all the form fields remain filled-in (maybe this is normal behavior). When not using the "store" property the page reloads with empty fields as expected, but of course the "retriever" aspect doesn't work either.

    It's not a big deal but is there a way to ensure the form fields are empty after the page reloads?
      Todd
      • 4172
      • 5,888 Posts
      If you do not redirect somewhere else, you don't need store/FormitRetriever.

      You can just read the value from REQUEST and output it to the success message with a simple snippet like getReqParam or something like that.

      Maybe, you need to call that snippet before Formit and set the value to a placeholder.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 40088
        • 708 Posts
        I've tried using getReqParam in the past but was never able to get the sender's name placeholder to show in the success message.
          Todd
          • 4172
          • 5,888 Posts
          you can also try to set the placeholder in a formit-hook.

          $modx->setPlaceholder('sendername',$hook->getValue('name'));
          return true;


          and use that placeholder in the message.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 40088
            • 708 Posts
            Is this code put into a Snippet then referenced in the FormIt hooks property?
              Todd