WordPress.org

Support

Support » Plugins and Hacks » generating or figuring urls with a form or on a page

generating or figuring urls with a form or on a page

  • 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)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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/

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘generating or figuring urls with a form or on a page’ is closed to new replies.
Skip to toolbar