URL Parameters

Change an Idea Widget's language, pre-filled fields, screens and appearance with URL parameters or JavaScript settings.

You can change how an Idea Widget looks and behaves with URL parameters or JavaScript settings. That lets you reuse one widget across websites, languages and use cases, without creating a widget for each variation.

A parameter overrides the widget's saved configuration when the widget loads.

Choose how to pass parameters

How you pass parameters depends on the widget type.

Full-page widget

Add the parameters to the widget URL.

Full-page widget URL

https://idea-widget.ideanote.io/idea-submission?config=YOUR_CONFIG_ID&preferences.lang=en

Inline widget

Add the parameters to the src attribute of the iframe.

Inline widget

<iframe
  title="Idea Collection Widget"
  style="border: none; width: 100%; height: 400px;"
  src="https://idea-widget.ideanote.io?config=YOUR_CONFIG_ID&preferences.lang=en"
  allowfullscreen>
</iframe>

Popover widget

Set window.ideanoteSettings as a nested object before the widget script loads. The script creates the iframe and turns your settings into URL parameters.

Popover widget

<script>
  window.ideanoteSettings = {
    config: "YOUR_CONFIG_ID",
    preferences: {
      lang: "en"
    }
  };
</script>

<script
  async
  src="https://static.ideanote.io/widget/widget.js">
</script>

Set the widget language

Use preferences.lang to set the language of the widget.

Language

Parameter

English

preferences.lang=en

Danish

preferences.lang=da

German

preferences.lang=de

French

preferences.lang=fr

Swedish

preferences.lang=sv

Spanish

preferences.lang=es

The visitor's browser language

preferences.lang=autodetect

For example, these two links open the same widget in English and in Danish:

English

https://idea-widget.ideanote.io/idea-submission?config=YOUR_CONFIG_ID&preferences.lang=en

Danish

https://idea-widget.ideanote.io/idea-submission?config=YOUR_CONFIG_ID&preferences.lang=da

Without the parameter, the widget uses its saved language setting, which starts as the workspace language.

If your widget uses custom translation variables, make sure they are translated into each language you link to.

Pre-fill form fields

Use preferences.defaultValues to pre-fill fields in the idea form. You can pass context such as a product name, the page address, a reference number or a suggested description.

The value is an object with field IDs as keys and the default values as values.

In a Popover widget

Popover widget with default values

window.ideanoteSettings = {
  config: "YOUR_CONFIG_ID",
  preferences: {
    lang: "en",
    defaultValues: {
      "YOUR_FIELD_ID": "Suggested value",
      "ANOTHER_FIELD_ID": "Another value"
    }
  }
};

In a URL

For Full-page and Inline widgets, turn the object into JSON and URL-encode it.

Build the URL

const defaultValues = {
  "YOUR_FIELD_ID": "Suggested value"
};

const url =
  "https://idea-widget.ideanote.io?config=YOUR_CONFIG_ID" +
  "&preferences.defaultValues=" +
  encodeURIComponent(JSON.stringify(defaultValues));

The result looks like this:

URL with default values

https://idea-widget.ideanote.io?config=YOUR_CONFIG_ID&preferences.defaultValues=%7B%22YOUR_FIELD_ID%22%3A%22Suggested%20value%22%7D

Example: Collect feedback on a web page

This Inline widget pre-fills two fields: one with the path of the current page, and one with the start of a description that names the page.

Website feedback widget

<iframe
  id="feedback-widget"
  title="Website Feedback"
  style="border: none; width: 100%; height: 300px;">
</iframe>

<script>
  const defaultValues = {
    "YOUR_URL_FIELD_ID": window.location.pathname,
    "YOUR_DESCRIPTION_FIELD_ID":
      'You could improve the article "' +
      document.title + '" by '
  };

  const url =
    "https://idea-widget.ideanote.io?config=YOUR_CONFIG_ID" +
    "&preferences.lang=en" +
    "&preferences.defaultValues=" +
    encodeURIComponent(JSON.stringify(defaultValues));

  document.getElementById("feedback-widget").src = url;
</script>

Replace the configuration ID and the field IDs with your own.

All parameters

General

Parameter

Example value

config

YOUR_CONFIG_ID

preferences.lang

en

preferences.defaultValues

URL-encoded JSON

preferences.allowExploreIdeas

true

preferences.noninteractive

false

Welcome screen

Parameter

Example value

preferences.entry.skip

true

preferences.entry.title

Share your feedback

preferences.entry.text

Help us improve

preferences.entry.hideTitle

true

preferences.entry.hideCover

true

preferences.entry.hideText

true

preferences.entry.hideButtons

true

preferences.entry.cover

Media reference

preferences.entry.buttons

JSON array

Form screen

Parameter

Example value

preferences.submission.hideHeader

true

preferences.submission.hideProgress

true

Success screen

Parameter

Example value

preferences.confirmation.title

Thank you

preferences.confirmation.text

Your feedback has been received.

preferences.confirmation.graphics

confetti or none

preferences.confirmation.hideCover

true

preferences.confirmation.hideTitle

true

preferences.confirmation.hideText

true

preferences.confirmation.hideButtons

true

preferences.confirmation.cover

Media reference

preferences.confirmation.buttons

JSON array

Appearance

Parameter

Example value

theme.colorMode

light or dark

theme.content.primary

%237C3AED

theme.motionMode

Motion mode setting

URL-encode text and special characters. For example, the # of a color code becomes %23.

Combine parameters

Join several parameters with &.

This link opens a Danish feedback widget that skips the Welcome screen, hides the form header and shows no confetti:

Combined parameters

https://idea-widget.ideanote.io/idea-submission?config=YOUR_CONFIG_ID&preferences.lang=da&preferences.entry.skip=true&preferences.submission.hideHeader=true&preferences.confirmation.graphics=none

The same settings for a Popover widget:

Combined settings

window.ideanoteSettings = {
  config: "YOUR_CONFIG_ID",
  preferences: {
    lang: "da",
    entry: {
      skip: true
    },
    submission: {
      hideHeader: true
    },
    confirmation: {
      graphics: "none"
    }
  }
};

Supported language codes

en, cs-CZ, da, de, el, es, fi-FI, fr, fr-CA, hu-HU, it, nl, pt-BR, sk-SK, sv, zh-Hans, zh-Hant, vi, th, tr, ar, sl, no, pl

Use autodetect for the visitor's browser language.