diff --git a/apps/docs/app/global/hidden-fields/filled-hidden-fields.webp b/apps/docs/app/global/hidden-fields/filled-hidden-fields.webp new file mode 100644 index 0000000000..1881351586 Binary files /dev/null and b/apps/docs/app/global/hidden-fields/filled-hidden-fields.webp differ diff --git a/apps/docs/app/global/hidden-fields/hidden-field-responses.webp b/apps/docs/app/global/hidden-fields/hidden-field-responses.webp new file mode 100644 index 0000000000..0d01d48e74 Binary files /dev/null and b/apps/docs/app/global/hidden-fields/hidden-field-responses.webp differ diff --git a/apps/docs/app/global/hidden-fields/hidden-fields.webp b/apps/docs/app/global/hidden-fields/hidden-fields.webp new file mode 100644 index 0000000000..6c4dc4ab8d Binary files /dev/null and b/apps/docs/app/global/hidden-fields/hidden-fields.webp differ diff --git a/apps/docs/app/global/hidden-fields/input-hidden-fields.webp b/apps/docs/app/global/hidden-fields/input-hidden-fields.webp new file mode 100644 index 0000000000..8f3d4e45a9 Binary files /dev/null and b/apps/docs/app/global/hidden-fields/input-hidden-fields.webp differ diff --git a/apps/docs/app/global/hidden-fields/page.mdx b/apps/docs/app/global/hidden-fields/page.mdx new file mode 100644 index 0000000000..e47f7f521c --- /dev/null +++ b/apps/docs/app/global/hidden-fields/page.mdx @@ -0,0 +1,79 @@ +import { MdxImage } from "@/components/MdxImage"; + +import FilledHiddenFields from "./filled-hidden-fields.webp"; +import HiddenFieldResponses from "./hidden-field-responses.webp"; +import HiddenFields from "./hidden-fields.webp"; +import InputHiddenFields from "./input-hidden-fields.webp"; + +export const metadata = { + title: "Hidden Fields", + description: "Add hidden fields to your surveys to capture additional data without requiring user inputs!", +}; + +# Hidden Fields + +Hidden fields are a powerful feature in Formbricks that allows you to add data to a submission without asking the user to type it in. This feature is especially useful when you already have information about a user that you want to use in the analysis of the survey results (e.g. `payment plan` or `email`) + +Hidden fields are now available in the Formbricks in-app and website surveys as well + +## How to Add Hidden Fields + +### Enable them in the Survey Builder + +1. Edit the survey you want to add hidden fields to & switch to the Questions tab and scroll down to the bottom of the page. You will see a section called **Hidden Fields**. Make sure to enable it by toggling the switch. + + + +2. Now click on it to add a new hidden field ID. You can add as many hidden fields as you want. + + + + + +### Set Hidden Field + + + + +```sh +formbricks.track("my event", { + hiddenFields: { + screen: "landing_page", + job: "Founder" + }, +}); +``` + + + + +## View Hidden Fields in Responses + +These hidden fields will now be visible in the responses tab just like other fields in the Summary as well as the Response Cards, and you can use them to filter and analyze your responses. + + + +## Use Cases + +- **User Metadata**: You can add hidden fields to capture user metadata such as user ID, email, or any other user-specific information. +- **Survey Metadata**: You can add hidden fields to capture other metadata, e.g. the screen from which the survey was filled, or any other app specific information. diff --git a/apps/docs/app/link-surveys/hidden-fields/page.mdx b/apps/docs/app/link-surveys/hidden-fields/page.mdx index 38e83474fc..d37c391486 100644 --- a/apps/docs/app/link-surveys/hidden-fields/page.mdx +++ b/apps/docs/app/link-surveys/hidden-fields/page.mdx @@ -4,7 +4,6 @@ import FilledHiddenFields from "./filled-hidden-fields.webp"; import HiddenFieldResponses from "./hidden-field-responses.webp"; import HiddenFields from "./hidden-fields.webp"; import InputHiddenFields from "./input-hidden-fields.webp"; -import SettingsPage from "./settings.webp"; export const metadata = { title: "Hidden Fields", @@ -21,16 +20,7 @@ Hidden fields are a powerful feature in Formbricks that allows you to add data t ### Enable them in the Survey Builder -1. Edit the survey you want to add hidden fields to & open it's settings, make sure it's selected as a **Link Survey**. - - - -2. Switch to the Questions tab and scroll down to the bottom of the page. You will see a section called **Hidden Fields**. Make sure to enable it by toggling the switch. +1. Edit the survey you want to add hidden fields to & switch to the Questions tab and scroll down to the bottom of the page. You will see a section called **Hidden Fields**. Make sure to enable it by toggling the switch.