We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    Has anyone had any luck getting Formz to redirect to an ID instead of displaying the Success Message?

    I can see the tpl starts as follows and is a straightforward FormIt snippet


    [[!FormIt?
        &hooks=`[[+action]]`
        &excludeFields=`submit`


    I've tried changing to the following and a few variations but having no luck :-/

    [[!FormIt?
    	&hooks=`redirect`
           &redirectTo=`6`
    



      ...
      • 8386 ☆ A M B ☆
      • 160 Posts
      Can you state which version of Formz you are using please?

      Try doing this:

      [[!FormIt?
          &hooks=`[[+action]], redirect`
          &redirectTo=`6`
          &excludeFields=`submit`
      


      If this doesn't work let me know.
        • 37042
        • 384 Posts
        Thanks for getting back to me.

        Using Formz 1.0.0-rc1 and your code sample works. I was getting a validation error from SyntaxChecker which was preventing me saving the form.

        It'd be great to be able to specify the &redirectTo= on the Formz builder instead of the tpl. I know my clients will be using this and creating many forms. Each form will need its own redirect page.

        Is that in the pipeline?
          ...
          • 8386 ☆ A M B ☆
          • 160 Posts
          Never thought of that, add a ticket to the Github repository and I will add it in. In the time being you could create a TV called redirectForm and pass that as the id for each form redirectTo since the Forms have to be attached to a page anyway.

          [[!FormIt?
              &hooks=`[[+action]], redirect`
              &redirectTo=`[[*redirectForm]]`
              &excludeFields=`submit`
          
            • 37042
            • 384 Posts
            Great idea. Thanks!
              ...