Skip to content

Search the Omeda Knowledge Base

How to send a user back to your website after form submission (redirect to a return URL)

Signing up for a subscription or newsletter should be a seamless process for your users, even when filling out a form that is not embedded on your website. Setting up a redirect to a return URL will send users to the same location on your website where they were browsing before they navigated to your form.

First, set up two elements in Content
These fields only need to be created once; they can be used on any form created.

  1. Create a field to capture the URL that the user is navigating away from. Follow these steps in Content:
    1. On the company level, click Form Elements > Field > Create new.
    2. Enter returnurl for both the web label and short description, and set the max length to 999. Leave the remaining fields as they are.
  2. Create a redirect to include this return url. Follow these steps:
    1. In Content (on the company level), click Tools > Export Url > Create new.
    2. Give the export url a description you will recognize, such as “Return URL Redirect.”
    3. Set the format to redirect and leave the output format as is.
    4. The Url box should include the merge variable for the field you created in step one. To find the merge variable, search the content section at the top of the form.
      1. Select Internal Use in the dropdown box and search for your returnurl element.
      2. Highlight the merge variable by clicking on it, place your cursor in the Url box at the bottom, and then click insert (back toward the top). This will populate the Url box with that merge variable.
      3. It is also a good idea to append the olytics encrypted ID in case it is needed. Add this string to the end: ?oly_enc_id=%%0.2.110%%. This merge variable is standard across all databases.

Next, place these two items on your form in Builder.

  1. Place the returnurl field on the first page to enable the form to capture that url.
    1. In the left-side menu, navigate to Generic Use > Field > find your returnurl element and drag this into any content box on the first page of the form. Click save.
    2. Open the returnurl element by clicking the pencil/paper icon that appears on the right side of the element.
      1. On the Display Options tab, set the control template to Hidden.
      2. On the Form Options tab, enter returnurl for the inbound parameter. We recommend that you also enter a default value that will be passed along in case a return url value is not passed to the form.
      3. Click Done to save.
  2. Place the export URL on the last page of the form. In the left-side menu, navigate to Page elements > Export URL > find your export url element. Drag this anywhere on the page and click save.

Screenshot for step 1

Screenshot for step 2

To test:

  1. Go to the first page of your form and click Preview at top right.
  2. Add the following string onto the end of the URL that appears in the address bar, and then click enter: &returnurl=https://main.omeda.com.
  3. Fill out the form as if you are an end user and submit. For this test, the form should redirect you to Omeda’s homepage.
  4. Run a second test without that string appended to your URL and it will take you to the default URL you entered on page one (if you entered one).

Table of Contents
Knowledge Base Feedback