I'm setting up landing pages in Craft where someone can fill out a very basic form and get an eBook. My idea was to have the form /info/landing-page-title
submit to /info/landing-page-title/thank-you
, where they will be given a link to download their document. My plan was to use an if-then or switch statement in the template to check if segment(3) was populated or not. However, I'm having a difficult time getting it to redirect to the "thank-you" for the same landing page.
Currently I'm trying to use something like
/{{ craft.request.getSegment(1) }}/{{ craft.request.getSegment(2) }}/thank-you
While that will output fine on the page, the form is ignoring it.
Any suggestions on why, or a better way to do it?