generating or figuring urls with a form or on a page (3 posts)

  1. csleh
    Posted 3 years ago #

    I'm trying to build a form so that when the info is submitted, the viewer is redirected to a page where they can access a specific pdf file. Because there will be 70 of these, the form should ideally be as automated as possible. These people will not be members of the site.

    I had two thoughts:
    One, pass the current page (the one the form is on) title into the redirect, and add something like"pdf" so I create a new url to redirect to;

    Or, two, on a generic page they are redirected to, have it recognize what page they came from, and show them the pdf they were requesting.

    My question is, how can I add generated information to the redirect url in Contact Form 7, OR, how can I get a page to recognize what page the viewer just came from (which isn't the same as wordpress previous page)?

  2. blackstudio
    Posted 3 years ago #

    not sure what you're asking but if you want to redirect a viewer after they have completed the form you add this;

    on_sent_ok: "location = 'put your url where you want to send them here';"

    into the additional settings area at the bottom of the CF7 admin page.

    I did this for a client on here http://lifecoach.yourfuturenow.com.au/

  3. csleh
    Posted 3 years ago #

    I should have separated this into 2 questions, really. Thanks, but what I was hoping for was a way to automatically add something to the end of the url, based on the page they are on. So if they are on page "mysite/paperonepage" they would be redirected to "mysite/paperonepage/paperonepagepdf"

    Otherwise, I'm looking at a separate form for each and every one of these download offers.

Topic Closed

This topic has been closed to new replies.

About this Topic