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

    I'm attempting to set up a form which either takes a user to a download or a thank you page. This means I can use 1 form across my site but change the output depending on what the user wants.

    Here's the code:

    &redirectTo=`[[*download:ifnotempty=`[[*download]]`:else=`93`]]`

    Where [[*download]] is a link to a download.

    I've also tried &redirectTo=`[[+download:ifnotempty=`[[+download]]`:else=`93`]]`

    and

    &redirectTo=`[[*download:ifnotempty=`**WEBSITE URL**[[*download]]`:else=`93`]]`

    Nothing is working. The form redirects to page 93 regardless - even when the TV [[download]] is linked to a file. Am I missing a trick or are there restrictions to using modifiers in FormIt in this way?
      To infinity... and beyond!
    • The redirectTo property must be a resource ID, not a link.

      You might be better off using the same resource for the download as well as the thankyou page; a snippet on the thankyou page would either offer a link to the download or display the thank you acknowledgement. Use FormIt's "store" property and the FormItRetriever snippet for the file link.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org