Embedded form

Embedding a Returnless return form directly into your website allows your customers to complete their return announcement without being redirected away from your shop. This creates a smoother experience and helps maintain trust and consistency throughout the return process.

By enabling the embedded form, the complete return flow (from entering order details to selecting items to return) becomes available within your website.


How to Set Up the Embedded Form

The embed configuration is done per return form. To set it up:

  1. Log in to the Returnless Panel.
  2. Navigate to Settings → Return forms → Return form settings.
  3. In the left-hand navigation, click Embed form.
  4. Here you’ll find your HTML embed code snippet.
  5. Copy the snippet and paste it into your website’s HTML at the location where you want the form to appear.

Once added, the script automatically converts into a <div>   containing the fully functional return form.

Important: The embedded form uses a URL query parameter for internal navigation. Ensure this parameter does not conflict with your website’s existing URL parameters.


Optimizing Load Time

To speed up the form’s initial load, you may preload the Returnless embed script:

<link rel="preload" href="https://panel.returnless.com/embed.js" as="script" crossorigin />

Add this line inside your page’s <head>  element.

This lets the browser pre-fetch the script early, improving overall performance.


Allowed URLs

To ensure the form works correctly, you must explicitly allow the domains where it will be embedded.

  1. In the embed settings, click Add URL.
  2. Enter the domain(s) where the form will appear.

If a URL is not added to the allowlist, the form will display a 403 Forbidden error.


Continuing a Return or Viewing Status

During the return announcement flow, the customer’s URL is updated with a return intent ID. This ID helps preserve progress:

  • If the customer reloads the page, their announcement is restored automatically.
  • If the customer navigates away or closes the browser, the intent is not preserved, and a new return can be started.

Starting a New Return Immediately

If you want customers to start a new return after completing one, add a button on your website that removes the intent ID from the URL.

Returning to View Status

Customers can revisit their return status by accessing the URL containing their intent ID:

?url=/en/

You may store this ID and present the customer with a “View return status” link.


Language Settings

By default, the embedded form detects the customer’s browser language. If that language is not supported on your form, it falls back to the form’s default language.

Forcing a specific language

You can override the language using the data-form-locale   attribute:

<div id="returnless-mount" 
     data-form-id="<form id>" 
     data-form-locale="en">
</div>
<script src="https://panel.returnless.com/embed.js"></script>

Supported Locales

Code Language
bg Bulgarian
cz Czech
de German
dk Danish
en English
es Spanish
fi Finnish
fr French
hu Hungarian
it Italian
nl Dutch
pl Polish
pt Portuguese
ro Romanian
se Swedish
sk Slovak
sv Slovenian

Prefilling the Embedded Form

You can prefill order information so customers don't need to enter it manually.

When both the order_number  and the form's configured validation field are provided, the return form will automatically skip the order lookup step and go directly to item selection.

Supported Parameters

Parameter Required Description
order_number Yes The order number to look up.
email Optional* Customer email address.
postcode Optional* Customer postcode.
external_customer_id Optional* External customer identifier.

* One of these validation fields may be required depending on your form configuration. The parameter you provide must match the validation method configured for the form.

How It Works

Do not add prefill parameters directly to the embed.js  URL. The prefill data goes on the page URL where the form is embedded.

Assume your embedded return form is hosted at:

https://example.com/returns

To prefill the form, URL-encode the Returnless parameters and pass them as the url  query parameter:

Step Value
Parameters ?order_number=25276090&postcode=1234AB
Encoded %3Forder_number%3D25276090%26postcode%3D1234AB
Final URL https://example.com/returns?url=%3Forder_number%3D25276090%26postcode%3D1234AB

When the customer visits this URL, the embedded form will automatically use the provided values and skip the order lookup step.

Important: Always URL-encode the entire parameter string before assigning it to the url  query parameter.

Examples

Order number + email

https://example.com/returns?url=%3Forder_number%3DORD123%26email%3Djohn%40doe.com

Order number + postcode

https://example.com/returns?url=%3Forder_number%3DORD123%26postcode%3D1234AB

Order number + external customer ID

https://example.com/returns?url=%3Forder_number%3DORD123%26external_customer_id%3DCUST-12345

Why Emails Redirect to the Hosted Form

Emails sent via the Returnless panel (e.g., notifications) include links directing customers to the hosted form, not the embedded form.

This guarantees:

  • A consistent fallback URL
  • That customers can always access their return status

(The embedded form’s URL structure may vary per webshop, so the hosted form ensures reliability.)


FAQ

The embedded form does not show up in my Lightspeed webshop

Lightspeed removes <script>   tags from content added via the source code editor.

To resolve this, follow Lightspeed’s instructions for adding script tags correctly, ensuring:

<script src="https://panel.returnless.com/embed.js"></script>

is allowed on your page.


The embedded form does not show up in my Adobe webshop

Check your browser console. If you see an error like:

Refused to load the script 'https://panel.returnless.com/embed.js'
because it violates the site's Content Security Policy (CSP)

Your website is blocking external scripts.

To fix this, a developer must either:

  • Whitelist https://panel.returnless.com/   in the CSP configuration, or
  • Use Adobe’s SecureHtmlRenderer   inside your templates.

Both solutions are described in Adobe’s Content Security Policies documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us