Embeded 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 Form

You can prefill order details so customers don’t need to enter them manually. When both the order number and validation method are provided, the form skips directly to the item selection screen.

Example (order number + email)

?url=?order_number=ORD123&email=john@doe.com

Prefilled parameters behave the same way as with hosted return forms.


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