Compare commits

...

110 Commits

Author SHA1 Message Date
Matti Nannt
623e82ff4d fix: Add rate limit to forgot password route
Add rate limiting to the `/auth/forgot-password` route.

* Import `loginLimiter` in `apps/web/app/api/v1/users/forgot-password/route.ts` and apply it to the `POST` function.
* Add `forgotPasswordLimiter` in `apps/web/app/middleware/bucket.ts` with the same limits as `loginLimiter`.
* Add `forgotPasswordRoute` function in `apps/web/app/middleware/endpointValidator.ts` to identify the `/auth/forgot-password` route.
* Update `apps/web/middleware.ts` to include `forgotPasswordLimiter` and `forgotPasswordRoute` in the rate limiting logic.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/formbricks/formbricks?shareId=XXXX-XXXX-XXXX-XXXX).
2024-10-28 21:36:30 +01:00
Bhavesh Mishra
33543f59f8 feat: Added longterm retention check in template (#4061)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-28 03:56:04 +00:00
DivyanshuLohani
47826a45aa fix: open specific nav group on docs page on first page load (#4034)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-26 23:16:04 +00:00
Aditya Deshlahre
6f043ec16e docs: add image or video to question (#4041)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-26 23:15:44 +00:00
Bhavesh Mishra
c2703788ae feat: oss.gg: add new background video (#4051)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-26 22:13:36 +00:00
Aditya Deshlahre
ef7df0fc77 fix: added webhook url test for a valid URL (#4007)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-25 21:18:38 +00:00
Jonas Höbenreich
cdb8199199 feat: oss.gg: add new background video (#4017) 2024-10-25 21:08:20 +00:00
Piyush Gupta
b0ded570ff fix: inconsistencies in survey summary (#4032)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-25 16:53:55 +00:00
Piyush Gupta
5c0b29eed4 fix: summary calculation in multi choice questions (#4022)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-25 09:17:06 +00:00
Piyush Gupta
8e16d8daf6 fix: adds CSP header (#3754) 2024-10-25 08:58:59 +00:00
Johannes
deea760a17 fix: animate tweaks (#4015) 2024-10-24 20:02:18 -07:00
Matti Nannt
f56f08e3c1 docs: fix last occurence of old sdk call from docs (#4016) 2024-10-24 22:04:03 +02:00
Matti Nannt
5daeab6554 chore: remove attributes from identify call (#4012)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-10-24 17:16:56 +00:00
DivyanshuLohani
0d11c08be7 feat: add auto animate to web app components #3825 (#3887)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-24 08:42:29 +00:00
Dhruwang Jariwala
e7fbdb4d00 fix: back button label updation and onboarding container layout (#3868)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-24 00:04:53 +00:00
Shrey
9538c2e6e3 feat: added windows bliss background (#3879)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-23 23:56:07 +00:00
Chirag Arora
3b5f9adcd1 fix: button size in all modals to size "sm" (#3799)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 23:35:49 +00:00
Parth Seth
90480317af fix: handle incorrect 2FA OTP error (#3935)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 23:35:23 +00:00
DivyanshuLohani
352e905529 fix: add text-center to fix date picker date background on hover (#3916)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 23:31:10 +00:00
DivyanshuLohani
588768c849 fix: resposiveness issue in the survey's hidden fields (#3952)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 23:19:17 +00:00
Jonas Höbenreich
2bab855b05 feat: add Employee Well-Being template (#3981)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 23:16:44 +00:00
Dominique Barton
7fdc2eec34 docs: remove unnecessary Airtable environment var (#3995)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 23:04:41 +00:00
Sarthak Kumar Shailendra
464455be2b fix: update twitter icon to x (#4001)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 22:54:38 +00:00
Naineel Soyantar
0a11c6aed5 fix: broken redirects on self-hosting > integrations docs (#3998)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-23 22:53:00 +00:00
Johannes
8566b4c3da fix: survey list spacing and loading (#4003) 2024-10-23 13:32:12 -07:00
sateshcharan
9465bd15f2 feat: setup node with .nvmrc (#3941) 2024-10-23 17:02:36 +00:00
Recep Erdoğan
37791fc78f feat: add Helm chart for Formbricks with PostgreSQL, Redis, and Traefik (#3220) 2024-10-23 05:51:00 +02:00
sateshcharan
98c16eb4b8 feat: [🕹️] Design a background (600 Points) (Double for animated) (#3937)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-21 23:59:56 +00:00
sateshcharan
7803de6ee7 feat: [🕹️] Add Template to Library (150 points) (#3947)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-21 22:22:58 +00:00
Johannes
d9e2267a3a fix: tweak ai ui (#3964) 2024-10-21 15:13:21 -07:00
Matti Nannt
9872d17abe feat: AI-based Open-Text Summary & new Experience page (#3038)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-10-20 12:06:46 +02:00
Ikko Eltociear Ashimine
4dad1226ce docs: update page.mdx (#3866) 2024-10-17 21:42:11 -07:00
Matti Nannt
5a2f8c586a chore: update usage limits for formbricks cloud (#3824) 2024-10-16 16:48:14 +02:00
Matti Nannt
eba60d4777 chore: update cloud prices (#3823)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-16 16:45:02 +02:00
Aditya Deshlahre
e633fc76be docs: Question type pages Addition On documentation (#3732)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-16 01:58:52 +00:00
Muhammad Abdul Rahman
700068dc9f fix(button): change loader color of secondary button to dark:text-slate-900 (#3795) 2024-10-16 00:33:20 +00:00
Dhruwang Jariwala
0f2f3b1af8 fix: breaking summary page dropdown (#3764) 2024-10-15 13:36:03 +00:00
Dhruwang Jariwala
35e4b1f965 fix: preview mode change (#3737) 2024-10-15 06:55:48 +00:00
Dev Dalia
047c9abe9c feat: standardize menu ui (#3333)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-10-15 06:44:31 +00:00
DivyanshuLohani
8f0c55808d fix: navigation active link issue (#3459)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-14 18:31:24 -07:00
Chase Nelson
03df021fbf feat: add descriptive for question types (#3356)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-15 00:27:53 +00:00
ALOK VERMA
be96885260 feat: Add back to top button on survey summary (#3292)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-14 23:53:49 +00:00
DivyanshuLohani
e75c1b3539 fix: href to correctly update the active state on the sidebar (#3573)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-14 16:42:56 -07:00
Nawin Kumar Sharma
49727ddf9e feat: Add Embed </> options to Survey cta bar and minor changes (#3272)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-14 23:12:54 +00:00
Aditya Pratap Singh
94985e0502 docs: added contact form article (#3558)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-10-14 21:52:27 +00:00
Jonas Höbenreich
9bf74407ae fix: a11y contrast issues (#3722) 2024-10-14 21:46:10 +00:00
Matti Nannt
5620d477e9 docs: update wording for 2.6 migration (#3724) 2024-10-14 23:43:33 +02:00
Sharad Kushwaha
e5f17aff44 fix: ui of create new survey trigger (#3703)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-14 21:27:56 +00:00
Matti Nannt
9bc5fab0ab fix: attribute activity not loading (#3721) 2024-10-14 23:07:33 +02:00
Piyush Gupta
8ca7c38def fix: added logging in actionClient (#3695) 2024-10-14 20:28:47 +00:00
Matti Nannt
f92a5eabc9 chore: prepare 2.6 release (#3531) 2024-10-14 21:55:32 +02:00
Anshuman Pandey
b40ed54e3c fix: adding packages for vite plugins (#3688) 2024-10-14 09:36:19 +00:00
Harinder Singh
7fa7591d59 fix: whitespace in status text should not break to next line (#3547)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-14 09:28:36 +00:00
Siddheya Kulkarni
81361b3901 fix: Update docs link to point to the quickstart (3539) (#3548)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-14 09:27:23 +00:00
Harinder Singh
49f78670d0 fix: Each child in a list should have a unique "key" prop (#3533)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-14 08:54:50 +00:00
Pranavx1
119a86350d fix: Debug Mode Link in Website & App Connection page is broken #3544 (#3616) 2024-10-13 17:15:20 +02:00
Himanshu Rai
58b43b7227 fix: Moved Integrations in Formbricks Docs to Core Features (#3551)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-13 07:02:42 +00:00
Matti Nannt
618617bf55 chore: update readme (#3601) 2024-10-13 08:47:18 +02:00
Matti Nannt
6ec748f6b7 chore: add turbo to nextjs dev server (#3529) 2024-10-12 10:42:12 +02:00
Chase Nelson
36cb4f6cd2 fix: docs navigation dropdowns with the same title (#3488) 2024-10-12 06:09:00 +00:00
Sharad Kushwaha
6fa805e7ab fix: issue of triggering opening and closing question paper on clicking on submenu options (#3506)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-12 06:06:54 +00:00
Vinay Kumar Maheshwaram
7dbc0f0f0e fix: Error when setting up project in GitHub Codespaces (#3483) 2024-10-12 08:00:40 +02:00
Jonas Höbenreich
807d448f68 fix: username overflow issue (#3501) 2024-10-12 05:44:38 +00:00
dependabot[bot]
014558964c chore(deps): bump the npm_and_yarn group across 2 directories with 1 update (#3449)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-11 14:08:27 +00:00
Panagiotis Kapros
28dc81f51f fix: load the script via src vs inline (#3330)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-10-11 11:45:56 +00:00
Pushan Thimmegowda
fca2989222 fix: Fixes issue where attempting to signin with google OAuth throws a "user exists" error instead of logging in (#3355)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-11 10:24:53 +00:00
Chase Nelson
0224564da5 fix: typo in padding class name (#3346)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-11 10:16:36 +00:00
Jonas Höbenreich
aeec821b7b fix: wrong tooltip in survey copy form (#3341)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-11 10:11:45 +00:00
Amit Sarah Pal
676145233a fix: Oveview Page Redirect and Contributing Section Redirects Links… (#3365)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-10-11 12:17:02 +02:00
Jonas Höbenreich
3be72007fa fix: Make js assets cachable (#3337)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Anshuman Pandey <54475686+pandeymangg@users.noreply.github.com>
2024-10-11 09:45:57 +00:00
DivyanshuLohani
f1b9a82192 feat: Add last used indicator on login page (#3376)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-10-11 05:41:22 +00:00
Pratik
fe8c1fbc47 feat: product configuration pages loading skeletons (#3262)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-10 23:16:16 +00:00
Matti Nannt
4c8be95737 fix: sub-navigation sorting in docs (#3415) 2024-10-11 00:17:58 +02:00
Naineel Soyantar
595fe98417 fix: broken redirect links in developer-docs/contributing (#3343) 2024-10-10 22:07:08 +00:00
Dhruwang Jariwala
abc4c7f156 feat: custom data fetching for surveys table (#3318) 2024-10-10 14:36:20 +00:00
Dhruwang Jariwala
a6a815c014 fix: autofocus and keyboard navigation issues (#3328) 2024-10-10 11:51:08 +00:00
dependabot[bot]
9cc83bc01a chore(deps): bump the npm_and_yarn group across 2 directories with 1 update (#3359)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-10 10:50:39 +00:00
Pushan Thimmegowda
9262764691 fix: add discord icon in organisation tab sub menu (#3349)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-10 10:42:33 +00:00
Matti Nannt
c2d452f196 chore: add docs build github action (#3358) 2024-10-10 12:43:09 +02:00
Matti Nannt
17f4cb81d4 chore: update prisma version (#3361) 2024-10-10 12:30:55 +02:00
Matti Nannt
cf4eec5134 chore: add react email dev server & fix package npm deps (#3350)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2024-10-10 09:08:46 +00:00
Matti Nannt
cedb0b27c0 fix: chromatic github action (#3357) 2024-10-10 10:34:19 +02:00
Matti Nannt
75d757944a chore: upgrade storybook & docs npm dependencies (#3342) 2024-10-09 14:20:53 +02:00
Jonas Höbenreich
989252dc5b fix: remove Buffer import from Pixel (#3168)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Anshuman Pandey <54475686+pandeymangg@users.noreply.github.com>
2024-10-09 09:18:37 +00:00
Pushan Thimmegowda
f31cc9f9a3 fix: unified capitalisation of settings cards (#3340) 2024-10-09 07:48:15 +00:00
Matti Nannt
c01c00ce2e chore: update js README for v3 release (#3334) 2024-10-08 16:29:18 +02:00
Dhruwang Jariwala
ba0adbfad3 chore: move billing page under ee route (#3251)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-08 13:50:58 +00:00
Anshuman Pandey
2bfea919fe fix: merges the app and website js sdk into @formbricks/js (#3314)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-08 12:40:58 +00:00
Pratham Chauhan
82a7b2276d fix: removed the tabs border (#3282)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-08 10:48:24 +00:00
Abhay Vishwakarma
ed7662be5d fix: fixed the gap issue in 2nd onboarding screen ui (#3300)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
2024-10-08 06:04:26 +00:00
Piyush Gupta
7207a4d3e6 fix: too many enterprise license checks on the ee server (#3164) 2024-10-07 11:09:15 +00:00
Dhruwang Jariwala
4c594fafb9 chore: refactored ranking question (#3313)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-10-07 07:30:27 +00:00
Jonas Höbenreich
02345bc82c fix: response delete tooltip cut off (#3289)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-06 22:35:53 +00:00
Vardhaman Bhandari
e8403699e1 fix: Incorrect Error Toast for Ending Card (#3306) 2024-10-06 22:35:34 +00:00
Pushan Thimmegowda
3a49abda43 fix: rounded corners of NPS in email preview (#3290)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-06 22:21:34 +00:00
Sai Suhas Sawant
fb4e4159bc fix: Align the UI for the different survey states (#3225)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-06 21:47:20 +00:00
Johannes
31a8cf3b23 fix: remove side quests from repo (#3312) 2024-10-06 14:28:15 -07:00
Sai Suhas Sawant
d8cb1c5fc9 feat: Randomize row order matrix questions (#3233)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2024-10-05 11:45:46 +00:00
Vardhaman Bhandari
683278e252 fix: update broken links in CONTRIBUTING.md (#3298) 2024-10-05 10:51:09 +02:00
Matti Nannt
6b04cc789b chore: improve packages endpoint cache to save bandwidth (#3284) 2024-10-04 08:41:41 +00:00
Dhruwang Jariwala
e31e9f4fa1 fix: matrix survey sync issue (#3283) 2024-10-04 06:21:03 +00:00
Dev Dalia
f38a4665e4 fix: keyboard opening unexpectedly (#3278)
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
2024-10-04 05:38:50 +00:00
Prajyot
0cc84c8734 fix: Add reference to the API in the Single Use Link docs #3257 (#3280)
Co-authored-by: prajyot28 <prajyot.sable@techstalwarts.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-10-03 14:31:27 -07:00
Johannes
80243b8561 Merge branch 'main' of https://github.com/formbricks/formbricks 2024-10-03 12:33:18 -07:00
Johannes
f90b508251 replace conditional logic with new content 2024-10-03 12:33:11 -07:00
Vanshika
d71a9c9c3d ossgg: update -brand with -brand-dark (#3256)
Co-authored-by: root <root@Vanshika>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-10-03 11:15:47 -07:00
Ikko Eltociear Ashimine
934a05a814 docs: update page.mdx (#3265) 2024-10-03 11:13:09 -07:00
Dhruwang Jariwala
21e9e9167f fix: survey preview updation issues (#3269) 2024-10-03 17:35:24 +00:00
Harsh Shrikant Bhat
ea0df287d9 ossgg: All three oss.gg sidequests (#3267) 2024-10-03 10:26:58 -07:00
Teddy ASSIH
74407e7919 ossgg: Like and Retweet ossgg launch post (#3274) 2024-10-03 07:56:44 -07:00
677 changed files with 19271 additions and 14657 deletions

View File

@@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@formbricks/formbricks-com", "@formbricks/demo", "@formbricks/web"]
"ignore": ["@formbricks/demo", "@formbricks/web"]
}

View File

@@ -21,7 +21,7 @@
"forwardPorts": [3000, 5432, 8025],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cp .env.example .env && sed -i '/^ENCRYPTION_KEY=/c\\ENCRYPTION_KEY='$(openssl rand -hex 32) .env && sed -i '/^NEXTAUTH_SECRET=/c\\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env && pnpm install && pnpm db:migrate:dev",
"postCreateCommand": "cp .env.example .env && sed -i '/^ENCRYPTION_KEY=/c\\ENCRYPTION_KEY='$(openssl rand -hex 32) .env && sed -i '/^NEXTAUTH_SECRET=/c\\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env && sed -i '/^CRON_SECRET=/c\\CRON_SECRET='$(openssl rand -hex 32) .env && pnpm install && pnpm db:migrate:dev",
"postAttachCommand": "pnpm dev --filter=@formbricks/web... --filter=@formbricks/demo...",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.

View File

@@ -1,4 +1,4 @@
version: '3.8'
version: "3.8"
services:
app:
@@ -22,11 +22,11 @@ services:
# Uncomment the next line to use a non-root user for all processes.
# user: node
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
db:
image: postgres:latest
image: pgvector/pgvector:pg17
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
@@ -41,12 +41,11 @@ services:
image: mailhog/mailhog
network_mode: service:app
logging:
driver: "none" # disable saving logs
driver:
"none" # disable saving logs
# ports:
# - 8025:8025 # web ui
# 1025:1025 # smtp server
volumes:
postgres-data: null

View File

@@ -180,3 +180,9 @@ UNSPLASH_ACCESS_KEY=
# Disable custom cache handler if necessary (e.g. if deployed on Vercel)
# CUSTOM_CACHE_DISABLED=1
# Azure AI settings
# AI_AZURE_RESSOURCE_NAME=
# AI_AZURE_API_KEY=
# AI_AZURE_EMBEDDINGS_DEPLOYMENT_ID=
# AI_AZURE_LLM_DEPLOYMENT_ID=

28
.github/workflows/build-docs.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Build Docs
on:
workflow_call:
jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
shell: bash
- run: |
pnpm build --filter=@formbricks/docs...
shell: bash

View File

@@ -1,4 +1,4 @@
name: Build web
name: Build Web
on:
workflow_call:
jobs:

View File

@@ -11,7 +11,7 @@ jobs:
timeout-minutes: 60
services:
postgres:
image: postgres:latest
image: pgvector/pgvector:pg17
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
@@ -50,6 +50,7 @@ jobs:
sed -i "s/CRON_SECRET=.*/CRON_SECRET=${RANDOM_KEY}/" .env
sed -i "s/NEXTAUTH_SECRET=.*/NEXTAUTH_SECRET=${RANDOM_KEY}/" .env
sed -i "s/ENTERPRISE_LICENSE_KEY=.*/ENTERPRISE_LICENSE_KEY=${RANDOM_KEY}/" .env
echo "" >> .env
echo "E2E_TESTING=1" >> .env
shell: bash

View File

@@ -50,6 +50,13 @@ jobs:
uses: ./.github/workflows/build-web.yml
secrets: inherit
docs:
name: Build Docs
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/build-docs.yml
secrets: inherit
e2e-test:
name: Run E2E Tests
needs: [changes]
@@ -59,7 +66,7 @@ jobs:
required:
name: PR Check Summary
needs: [lint, test, build, e2e-test]
needs: [lint, test, build, e2e-test, docs]
if: always()
runs-on: ubuntu-latest
steps:

2
.gitignore vendored
View File

@@ -58,3 +58,5 @@ packages/lib/uploads
# Vite Timestamps
*vite.config.*.timestamp-*
# js compiled assets
apps/web/public/js

View File

@@ -10,9 +10,6 @@ tasks:
gp sync-await init &&
turbo --filter "@formbricks/demo" go
- name: website
command: gp sync-await init && turbo --filter "@formbricks/formbricks-com" dev
- name: Init Formbricks
init: |
cp .env.example .env &&

3
.npmrc
View File

@@ -5,4 +5,5 @@ shared-workspace-shrinkwrap = true
access = public
enable-pre-post-scripts = true
legacy-peer-deps=true
node-linker=hoisted
node-linker=hoisted
save-exact=true

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
20.18.0

View File

@@ -16,9 +16,9 @@ Are you brimming with brilliant ideas? For new features that can elevate Formbri
Ready to dive into the code and make a real impact? Here's your path:
1. **Read our Best Practices**: [It takes 5 minutes](https://formbricks.com/docs/contributing/how-we-code) but will help you save hours 🤓
1. **Read our Best Practices**: [It takes 5 minutes](https://formbricks.com/docs/developer-docs/contributing/get-started) but will help you save hours 🤓
1. **Fork the Repository:** Fork our repository or use [Gitpod](https://formbricks.com/docs/contributing/gitpod)
1. **Fork the Repository:** Fork our repository or use [Gitpod](https://formbricks.com/docs/developer-docs/contributing/gitpod) or use [Codespaces](https://formbricks.com/docs/developer-docs/contributing/codespaces)
1. **Tweak and Transform:** Work your coding magic and apply your changes.

View File

@@ -2,7 +2,7 @@ Copyright (c) 2024 Formbricks GmbH
Portions of this software are licensed as follows:
- All content that resides under the "packages/ee/" directory of this repository, if that directory exists, is licensed under the license defined in "packages/ee/LICENSE".
- All content that resides under the "packages/ee/", "apps/web/modules/ee" & "apps/web/app/(ee)" directories of this repository, if these directories exist, is licensed under the license defined in "packages/ee/LICENSE".
- All content that resides under the "packages/js/", "packages/react-native/" and "packages/api/" directories of this repository, if that directories exist, is licensed under the "MIT" license as defined in the "LICENSE" files of these packages.
- All third party components incorporated into the Formbricks Software are licensed under the original license provided by the owner of the applicable component.
- Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.

View File

@@ -1,5 +1,7 @@
<div id="top"></div>
<p align="center">Help us grow and star us on Github! ⭐️</p>
<p align="center">
<a href="https://formbricks.com">

View File

@@ -13,16 +13,16 @@
"dependencies": {
"@formbricks/js": "workspace:*",
"@formbricks/react-native": "workspace:*",
"expo": "^51.0.26",
"expo-status-bar": "~1.12.1",
"react": "^18.2.0",
"react-native": "^0.74.4",
"expo": "51.0.26",
"expo-status-bar": "1.12.1",
"react": "18.3.1",
"react-native": "0.74.4",
"react-native-webview": "13.8.6"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~18.2.79",
"typescript": "^5.3.3"
"@babel/core": "7.25.2",
"@types/react": "18.3.11",
"typescript": "5.3.3"
},
"private": true
}

View File

@@ -1,22 +0,0 @@
interface SurveySwitchProps {
value: "website" | "app";
formbricks: any;
}
export const SurveySwitch = ({ value, formbricks }: SurveySwitchProps) => {
return (
<select
value={value}
onChange={(v) => {
formbricks.logout();
window.location.href = `/${v.target.value}`;
}}>
<option value="website" className="h-10 px-4 hover:bg-slate-100">
Website Surveys
</option>
<option value="app" className="hover:bg-slate-10 h-10 px-4">
App Surveys
</option>
</select>
);
};

View File

@@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

View File

@@ -1,15 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
async redirects() {
return [
{
source: "/",
destination: "/app",
permanent: false,
},
];
},
images: {
remotePatterns: [
{

View File

@@ -5,7 +5,7 @@
"scripts": {
"clean": "rimraf .turbo node_modules .next",
"dev": "next dev -p 3002 --turbo",
"go": "next dev -p 3002",
"go": "next dev -p 3002 --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
@@ -13,8 +13,8 @@
"dependencies": {
"@formbricks/js": "workspace:*",
"@formbricks/ui": "workspace:*",
"lucide-react": "^0.418.0",
"next": "14.2.5",
"lucide-react": "0.452.0",
"next": "14.2.15",
"react": "18.3.1",
"react-dom": "18.3.1"
},

View File

@@ -1,9 +1,8 @@
import Image from "next/image";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import formbricks from "@formbricks/js/app";
import { SurveySwitch } from "../../components/SurveySwitch";
import fbsetup from "../../public/fb-setup.png";
import formbricks from "@formbricks/js";
import fbsetup from "../public/fb-setup.png";
declare const window: any;
@@ -63,7 +62,6 @@ const AppPage = ({}) => {
<div className="min-h-screen bg-white px-12 py-6 dark:bg-slate-800">
<div className="flex flex-col justify-between md:flex-row">
<div className="flex flex-col items-center gap-2 sm:flex-row">
<SurveySwitch value="app" formbricks={formbricks} />
<div>
<h1 className="text-2xl font-bold text-slate-900 dark:text-white">
Formbricks In-product Survey Demo App

View File

@@ -1,143 +0,0 @@
import Image from "next/image";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import formbricks from "@formbricks/js/website";
import { SurveySwitch } from "../../components/SurveySwitch";
import fbsetup from "../../public/fb-setup.png";
declare const window: any;
const AppPage = ({}) => {
const [darkMode, setDarkMode] = useState(false);
const router = useRouter();
useEffect(() => {
if (darkMode) {
document.body.classList.add("dark");
} else {
document.body.classList.remove("dark");
}
}, [darkMode]);
useEffect(() => {
// enable Formbricks debug mode by adding formbricksDebug=true GET parameter
const addFormbricksDebugParam = () => {
const urlParams = new URLSearchParams(window.location.search);
if (!urlParams.has("formbricksDebug")) {
urlParams.set("formbricksDebug", "true");
const newUrl = `${window.location.pathname}?${urlParams.toString()}`;
window.history.replaceState({}, "", newUrl);
}
};
addFormbricksDebugParam();
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const defaultAttributes = {
language: "en",
};
formbricks.init({
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
attributes: defaultAttributes,
});
}
// Connect next.js router to Formbricks
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const handleRouteChange = formbricks?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
};
}
});
return (
<div className="min-h-screen bg-white px-12 py-6 dark:bg-slate-800">
<div className="flex flex-col justify-between md:flex-row">
<div className="flex flex-col items-center gap-2 sm:flex-row">
<SurveySwitch value="website" formbricks={formbricks} />
<div>
<h1 className="text-2xl font-bold text-slate-900 dark:text-white">
Formbricks Website Survey Demo App
</h1>
<p className="text-slate-700 dark:text-slate-300">
This app helps you test your app surveys. You can create and test user actions, create and
update user attributes, etc.
</p>
</div>
</div>
<button
className="mt-2 rounded-lg bg-slate-200 px-6 py-1 dark:bg-slate-700 dark:text-slate-100"
onClick={() => setDarkMode(!darkMode)}>
{darkMode ? "Toggle Light Mode" : "Toggle Dark Mode"}
</button>
</div>
<div className="my-4 grid grid-cols-1 gap-6 md:grid-cols-2">
<div>
<div className="rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">1. Setup .env</h3>
<p className="text-slate-700 dark:text-slate-300">
Copy the environment ID of your Formbricks app to the env variable in /apps/demo/.env
</p>
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
<div className="mt-4 flex-col items-start text-sm text-slate-700 sm:flex sm:items-center sm:text-base dark:text-slate-300">
<p className="mb-1 sm:mb-0 sm:mr-2">You&apos;re connected with env:</p>
<div className="flex items-center">
<strong className="w-32 truncate sm:w-auto">
{process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID}
</strong>
<span className="relative ml-2 flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"></span>
<span className="relative inline-flex h-3 w-3 rounded-full bg-green-500"></span>
</span>
</div>
</div>
</div>
<div className="mt-4 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">2. Widget Logs</h3>
<p className="text-slate-700 dark:text-slate-300">
Look at the logs to understand how the widget works.{" "}
<strong className="dark:text-white">Open your browser console</strong> to see the logs.
</p>
{/* <div className="max-h-[40vh] overflow-y-auto py-4">
<LogsContainer />
</div> */}
</div>
</div>
<div className="md:grid md:grid-cols-3">
<div className="col-span-3 self-start rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold dark:text-white">
Reset person / pull data from Formbricks app
</h3>
<p className="text-slate-700 dark:text-slate-300">
On formbricks.reset() the local state will <strong>be deleted</strong> and formbricks gets{" "}
<strong>reinitialized</strong>.
</p>
<button
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => {
formbricks.reset();
}}>
Reset
</button>
<p className="text-xs text-slate-700 dark:text-slate-300">
If you made a change in Formbricks app and it does not seem to work, hit &apos;Reset&apos; and
try again.
</p>
</div>
</div>
</div>
</div>
);
};
export default AppPage;

View File

@@ -9,8 +9,6 @@ export const metadata = {
"Dive deep into how actions in Formbricks help products and organizations to engage users at precise moments in their journey. Discover the power of actions, from coding to no-code setups, to refine user targeting and generate richer, more detailed user insights.",
};
#### App Surveys
# Actions
Actions are predefined events within your app that prompt Formbricks to display a survey when triggered. These are detected by the Formbricks widget, which then presents the appropriate survey based on your predefined settings.

View File

@@ -4,8 +4,6 @@ export const metadata = {
"Advanced Targeting allows you to show surveys to just the right group of people. You can target surveys based on user attributes, metadata, and other segments. This helps you get more relevant feedback and make data-driven decisions.",
};
#### App Surveys
# Advanced Targeting
Advanced Targeting allows you to show surveys to the right group of people. You can target surveys based on user attributes, device type, and more instead of spraying and praying. This helps you get more relevant feedback and make data-driven decisions. All of this without writing a single line of code.

View File

@@ -42,8 +42,8 @@ All you need to do is copy a `<script>` tag to your HTML head, and thats abou
!function(){
var apiHost = "https://app.formbricks.com";
var environmentId = "<your-environment-id>";
var userId = "<your-user-id>";
var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=apiHost+"/api/packages/app";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: environmentId, apiHost: apiHost, userId: userId})},500)}();
var userId = "<your-user-id>"; //optional
var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=apiHost+"/js/formbricks.umd.cjs";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: environmentId, apiHost: apiHost, userId: userId})},500)}();
</script>
<!-- END Formbricks Surveys -->
```
@@ -58,9 +58,6 @@ All you need to do is copy a `<script>` tag to your HTML head, and thats abou
<Property name="api-host" type="string">
URL of the hosted Formbricks instance.
</Property>
<Property name="userId" type="string">
User ID of the user who has active session.
</Property>
</Properties>
Refer to our [Example HTML project](https://github.com/formbricks/examples/tree/main/html) for more help! Now visit the [Validate your Setup](#validate-your-setup) section to verify your setup!
@@ -91,13 +88,13 @@ Now, update your App.js/ts file to initialise Formbricks.
```js
// other imports
import formbricks from "@formbricks/js/app";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user-id>",
userId: "<user-id>", //optional
});
}
@@ -119,9 +116,6 @@ export default App;
<Property name="api-host" type="string">
URL of the hosted Formbricks instance.
</Property>
<Property name="userId" type="string">
User ID of the user who has active session.
</Property>
</Properties>
Refer to our [Example ReactJs project](https://github.com/formbricks/examples/tree/main/reactjs) for more help! Now visit the [Validate your Setup](#validate-your-setup) section to verify your setup!
@@ -164,7 +158,7 @@ yarn add @formbricks/js zod
import { usePathname, useSearchParams } from "next/navigation";
import { useEffect } from "react";
import formbricks from "@formbricks/js/app";
import formbricks from "@formbricks/js";
export default function FormbricksProvider() {
const pathname = usePathname();
@@ -174,7 +168,7 @@ export default function FormbricksProvider() {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user-id>",
userId: "<user-id>", //optional
});
}, []);
@@ -217,13 +211,13 @@ Refer to our [Example NextJS App Directory project](https://github.com/formbrick
// other import
import { useRouter } from "next/router";
import { useEffect } from "react";
import formbricks from "@formbricks/js/app";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user-id>",
userId: "<user-id>", //optional
});
}
@@ -256,9 +250,6 @@ Refer to our [Example NextJS Pages Directory project](https://github.com/formbri
<Property name="api-host" type="string">
URL of the hosted Formbricks instance.
</Property>
<Property name="userId" type="string">
User ID of the user who has active session.
</Property>
</Properties>
First we initialize the Formbricks SDK, ensuring that it only runs on the client side.
@@ -292,13 +283,13 @@ yarn add @formbricks/js
<CodeGroup title="src/formbricks.js">
```js
import formbricks from "@formbricks/js/app";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user-id>",
userId: "<user-id>", //optional
});
}
@@ -339,9 +330,6 @@ router.afterEach((to, from) => {
<Property name="api-host" type="string">
URL of the hosted Formbricks instance.
</Property>
<Property name="userId" type="string">
User ID of the user who has active session.
</Property>
</Properties>
Refer to our [Example VueJs project](https://github.com/formbricks/examples/tree/main/vuejs) for more help! Now visit the [Validate your Setup](#validate-your-setup) section to verify your setup!
@@ -399,9 +387,6 @@ export default function App() {
<Property name="api-host" type="string">
URL of the hosted Formbricks instance.
</Property>
<Property name="userId" type="string">
User ID of the user who has active session.
</Property>
</Properties>
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View File

@@ -3,6 +3,7 @@ import { MdxImage } from "@/components/MdxImage";
import I1 from "./images/I1.webp";
import I2 from "./images/I2.webp";
import I3 from "./images/I3.webp";
import I3_1 from "./images/I3_1.webp";
import I4 from "./images/I4.webp";
import I5 from "./images/I5.webp";
import I6 from "./images/I6.webp";
@@ -15,44 +16,41 @@ export const metadata = {
"Formbricks is the easiest way to create and manage app surveys. This quickstart guide will show you how to create your first app survey in under 5 minutes.",
};
#### App Surveys
# Quickstart
App surveys have 6-10x better conversion rates than emailed surveys. This tutorial explains how to run a survey in both your web app and mobile app (React Native) in just 10 to 15 minutes. Lets go!
<Note>
App Surveys are ideal for websites that **have a user authentication** system. If you are looking to run
surveys on your public facing website, head over to the [Website Surveys Quickstart
Guide](/website-surveys/quickstart).
</Note>
1. **Create a free Formbricks Cloud account**: While you can [self-host](/self-hosting/deployment) Formbricks, but the quickest and easiest way to get started is with the free Cloud plan. Just [sign up here](https://app.formbricks.com/auth/signup) and you'll be guided to our onboarding like below:
<Note>
Website & App Surveys have the same integration process. The difference will come when we setup our survey.
</Note>
1. **Create a free Formbricks Cloud account**: While you can [self-host](/self-hosting/deployment) Formbricks, but the quickest and easiest way to get started is with the free Cloud plan. Just [sign up here](https://app.formbricks.com/auth/signup) and you'll be guided to our onboarding like below, choose the "Formbricks Surveys" option:
<MdxImage
src={I1}
alt="Choose website survey from survey type"
alt="Choose Formbricks Surveys"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. **Connect your App/Website**: Once you get through a couple of onboarding steps, youll be asked to connect your app or website. This is where youll find the code snippet for both HTML as well as the npm package which you need to embed in your app:
2. **Choose your Product Channel**: On this step, you have to choose between the various channels that you want your product to be created in, you can create both app and link surveys from all the channels, but for the onboarding, please choose between the app surveys or the public website options, upon doing this, you'll be prompted to connect your app / website to formbricks.
<MdxImage
src={I2}
alt="Choose between app and website surveys product channels"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
3. **Connect your App/Website**: Once you get through a couple of onboarding steps, youll be asked to connect your app or website. This is where youll find the code snippet for both HTML as well as the npm package which you need to embed in your app:
<MdxImage
src={I3}
alt="Code snippet for connecting app with Formbricks"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Paste the code snippet in your app and reload the page. You should now see the Formbricks widget in the lower right corner of your app! The integration is now complete.
Paste the code snippet in your app and reload the page. You should now see a message being displayed that your app or website is now connected with formbricks.
<MdxImage
src={I3}
src={I3_1}
alt="App connected with Formbricks"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
@@ -67,7 +65,7 @@ Onboarding is complete! Now lets create our first survey as you should see te
className="max-w-full rounded-lg sm:max-w-3xl"
/>
3. **Create your first survey**: To be able to see a survey in your app, you need to create one. Well choose one of the templates and head over to the survey settings:
4. **Create your first survey**: To be able to see a survey in your app, you need to create one. Well choose one of the templates and head over to the survey settings:
Pick the Survey Type as **App Survey**.
@@ -78,7 +76,7 @@ Pick the Survey Type as **App Survey**.
className="max-w-full rounded-lg sm:max-w-3xl"
/>
4. **Set Trigger for the Survey**: Scroll down to Survey Trigger and click on **+ Add action**, choose **New Session**. This will cause this survey to appear when the Formbricks Widget tracks a new user session:
5. **Set Trigger for the Survey**: Scroll down to Survey Trigger and click on **+ Add action**, choose **New Session**. This will cause this survey to appear when the Formbricks Widget tracks a new user session:
<MdxImage
src={I6}
@@ -87,7 +85,7 @@ Pick the Survey Type as **App Survey**.
className="max-w-full rounded-lg sm:max-w-3xl"
/>
5. **Set Recontact Options for debugging**: In Recontact Options we choose the following settings, so that we can play around with the survey more easily. By default, each survey will be shown only once to each user to prevent survey fatigue:
6. **Set Recontact Options for debugging**: In Recontact Options we choose the following settings, so that we can play around with the survey more easily. By default, each survey will be shown only once to each user to prevent survey fatigue:
<Note>
Please change this setting later on after testing your survey to prevent survey fatigue for your users.
@@ -100,7 +98,7 @@ Pick the Survey Type as **App Survey**.
className="max-w-full rounded-lg sm:max-w-3xl"
/>
6. **Publish your survey**: Now hit **Publish** and youll be forwarded to the Summary Page. This is where youll find the responses to this survey.
7. **Publish your survey**: Now hit **Publish** and youll be forwarded to the Summary Page. This is where youll find the responses to this survey.
<MdxImage
src={I8}
@@ -111,7 +109,7 @@ Pick the Survey Type as **App Survey**.
---
- We offer framework guides for various frontend tech, head over to the the [App Survey Framework Guides](/app-survey/framework-guides) to get started with your app survey.
- Head over to our App Survey SDK documentation to get started with the [App Survey JS SDK](/developer-docs/app-survey-sdk).
- We offer framework guides for various frontend tech, head over to the the [App Survey Framework Guides](/app-surveys/framework-guides) to get started with your app survey.
- Head over to our JS SDK documentation to get started with the [JS SDK](/developer-docs/js-sdk).
Still struggling or something not working as expected? [Join our Discord!](https://formbricks.com/discord) and we'd be glad to assist you!

View File

@@ -11,8 +11,6 @@ export const metadata = {
"Explore how to configure Recontact options in Formbricks to control the frequency of survey exposure to users, ensuring effective feedback collection without compromising user experience.",
};
#### App Surveys
# Recontact Options
Recontact options in Formbricks enable you to manage how often and under what conditions a survey is shown to a user. This feature is crucial for balancing effective feedback collection with a positive user experience by preventing survey fatigue.

View File

@@ -4,19 +4,12 @@ export const metadata = {
"Dive into the importance of user identification in surveys. Boost your survey response rates and target the right users with Formbricks.",
};
#### App Surveys
# User Identification
User Identification helps you to not only segment your users but also to see more information about the user who responded to a survey. This helps you to target surveys to specific user segments and see more information about the user who responded to a survey.
### Understanding Identified vs Unidentified Users
<Note>
Formbricks App Surveys can **only be used with identified users**. If you are looking to run surveys on your
public-facing website, head over to the [Website Surveys](/website-surveys/quickstart) section.
</Note>
In Formbricks, understanding the distinction between identified and unidentified users is crucial for effective survey segmentation and targeted feedback collection.
| Feature | Unidentified Users | Identified Users |

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -0,0 +1,169 @@
import { MdxImage } from "@/components/MdxImage";
import AddQuestion from "./images/add-question.webp";
import EmailField from "./images/email-field.webp";
import EmbedImage from "./images/embed.png";
import MessageField from "./images/message-field.webp";
import NameField from "./images/name-field.webp";
import QueryImage from "./images/query-form.webp";
import SingleSelect from "./images/single-select-questionare.webp";
import ToggleButton from "./images/welcome1.webp";
export const metadata = {
title: "Creating a Contact Form with Formbricks: A Step-by-Step Guide",
description:
"Learn how to easily create a professional contact form using Formbricks, perfect for beginners and experts alike.",
};
# Creating a Contact Form with Formbricks: A Step-by-Step Guide
Welcome to this comprehensive guide on creating a contact form using Formbricks. Whether you're just starting out or you're a seasoned developer, this tutorial will walk you through every step of building an engaging and effective contact form.
## What Well Build
By the end of this tutorial, you'll have created a simple contact form featuring:
1. A welcoming introduction.
2. Fields for collecting the user's name and email.
3. A question to find out why theyre contacting you.
4. A message field for users to share their queries.
### Setting Up Your Form
First, let's lay the groundwork for your form:
1. Head to the Surveys page and click on **New Survey**.
2. Select **Start from Scratch** to create a new form.
3. In the form editor, click the three dots next to a question, then select **Change Question Type** and choose **Statement (Call to Action)**.
<MdxImage
src={ToggleButton}
alt="Toggle button for Statement (Call to Action)"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
4. Add a welcoming statement to greet your users and explain the form's purpose.
5. Personalize the greeting to make it inviting and encourage engagement.
<Note>
A warm welcome sets the tone for your form. Make it friendly to encourage users to participate.
</Note>
### Adding the Name Field
Next, let's capture the user's name:
1. Click **Add Question**.
<MdxImage
src={AddQuestion}
alt="Adding a question in Formbricks"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. Enter the prompts for the name field.
3. Turn off the **Long Answer** option at the bottom right.
4. Adjust any **settings**, such as making the field required.
<MdxImage
src={NameField}
alt="Name field configuration"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Adding the Email Field
Now, lets add a field to collect the user's email address:
1. Click **Add Question** again.
2. Select Email as the input type.
3. Enter a prompt for the email field.
<MdxImage
src={EmailField}
alt="Email field configuration"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Adding a Reason for Contact
Lets now understand why the user is contacting you:
1. Click **Add Question** once again.
2. Select **Change Question** Type and choose **Single Select**.
3. Add the question "Why are you contacting us today?"
<MdxImage
src={SingleSelect}
alt="Single Select question configuration"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Note>Predefined options help categorize inquiries, making it easier for you to respond appropriately.</Note>
4. Add options like "General Inquiry," "Support," and "Feedback."
<MdxImage
src={QueryImage}
alt="Single Select question configuration"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Adding a Message Field
Finally, lets provide a space for the users message:
1. Click **Add Question** for the last time.
2. Add the question: "Your Message."
3. Set the placeholder text to something like "Please write your message here."
<MdxImage
src={MessageField}
alt="Message field configuration"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
4. Consider setting a minimum character count to ensure detailed messages.
### Finalizing Your Form
Once your form is complete, follow these final steps:
1. Review and rearrange the questions if necessary.
2. Test the form by filling it out as a user.
3. Customize the **Thank You** message for submissions.
4. Publish the form to get a shareable link.
5. Enable submission notifications:
- Go to your Formbricks account settings.
- Verify your email address.
- Ensure that **Survey** notifications are enabled.
### Integrating the Contact Form into Your Website
After publishing the form, follow these steps to integrate it into your site:
1. **Copy the Shareable Link**
- Find your form in the Formbricks dashboard, and click Share.
- Select Embed in a Web Page.
<MdxImage
src={EmbedImage}
alt="Embed Image configuration"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. **Embed the Code**
- Copy the provided code and paste it into your website where you want the form to appear.
3. **Test the Integration**
- Check if the form displays correctly on your site.
- Submit a test entry to ensure everything works and notifications are received.
## Conclusion
Congratulations! Youve successfully created and integrated a professional contact form using Formbricks. This form will help you collect valuable information from your visitors in an efficient, user-friendly way.
A great contact form strikes the balance between collecting necessary details and being simple enough to encourage submissions. **Youve achieved just that!**

View File

@@ -119,7 +119,7 @@ This allows us to capture and analyze partial feedback where the user is not wil
<MdxImage src={DocsNavi} alt="doc navigation" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
Locate that file. We are using the [Tailwind Template “Syntax”](https://tailwindui.com/templates/syntax) for our docs. Here is our [Layout.tsx](https://github.com/formbricks/formbricks/blob/main/apps/formbricks-com/components/docs/Layout.tsx) file.
Locate that file. We are using the [Tailwind Template “Syntax”](https://tailwindui.com/templates/syntax) for our docs.
3. Write the frontend code for the widget. Here is the full component (we break it down right below):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -43,7 +43,7 @@ const FAQ_DATA = [
Absolutely! We provide an option for users to host Formbricks on their own server, ensuring even more
control over data and compliance. And the best part? Self-hosting is available for free, always. For
documentation on self hosting, click{" "}
<a href="/docs/self-hosting/deployment" className="text-brand-dark dark:text-brand-light">
<a href="/self-hosting/deployment" className="text-brand-dark dark:text-brand-light">
here
</a>
.

View File

@@ -34,8 +34,8 @@ Once you open a PR, you will get a message from the CLA bot to fill out the form
We currently officially support the below methods to set up your development environment for Formbricks:
- [Gitpod](/docs/developer-docs/contributing/gitpod)
- [GitHub Codespaces](/docs/developer-docs/contributing/codespaces)
- [Gitpod](/developer-docs/contributing/gitpod)
- [GitHub Codespaces](/developer-docs/contributing/codespaces)
- [Local Machine Setup](#local-machine-setup)
Both Gitpod and GitHub Codespaces have a **generous free tier** to explore and develop. For junior developers we suggest using either of these, because you can dive into coding within minutes, not hours.
@@ -67,7 +67,19 @@ git clone https://github.com/formbricks/formbricks && cd formbricks
</CodeGroup>
</Col>
2. Install Node.JS packages via pnpm. Don't have pnpm? Get it [here](https://pnpm.io/installation)
2. Setup Node.JS with nvm:
<Col>
<CodeGroup title="Setup Node version with nvm">
```bash
nvm install && nvm use
```
</CodeGroup>
</Col>
3. Install Node.JS packages via pnpm. Don't have pnpm? Get it [here](https://pnpm.io/installation)
<Col>
<CodeGroup title="Install dependencies via pnpm">
@@ -79,7 +91,7 @@ pnpm install
</CodeGroup>
</Col>
3. Create a `.env` file based on `.env.example`. It's already preset to work with the local development setup but you can also change values if needed.
4. Create a `.env` file based on `.env.example`. It's already preset to work with the local development setup but you can also change values if needed.
<Col>
<CodeGroup title="Define environment variables">
@@ -91,7 +103,7 @@ cp .env.example .env
</CodeGroup>
</Col>
4. Generate & set some secret values mandatory for the `ENCRYPTION_KEY`, `NEXTAUTH_SECRET` and `CRON_SECRET` in the .env file. You can use the following command to generate the random string of required length:
5. Generate & set some secret values mandatory for the `ENCRYPTION_KEY`, `NEXTAUTH_SECRET` and `CRON_SECRET` in the .env file. You can use the following command to generate the random string of required length:
- For Linux
@@ -121,7 +133,7 @@ sed -i '' '/^CRON_SECRET=/s|.*|CRON_SECRET='$(openssl rand -hex 32)'|' .env
</CodeGroup>
</Col>
5. Make sure you have [`Docker`](https://docs.docker.com/compose/) & [`docker-compose`](https://docs.docker.com/compose/) installed and running on your machine. Then run the following command to start the Formbricks dev setup:
6. Make sure you have [`Docker`](https://docs.docker.com/compose/) & [`docker-compose`](https://docs.docker.com/compose/) installed and running on your machine. Then run the following command to start the Formbricks dev setup:
<Col>
<CodeGroup title="Start Formbricks Dev Setup">

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -5,18 +5,18 @@ import I2 from "./images/2-micro-survey-pop-up-in-app.webp";
import I3 from "./images/3-survey-logs-in-app-survey-popup.webp";
export const metadata = {
title: "Formbricks App Survey SDK",
title: "Formbricks JS SDK",
description:
"Integrate Formbricks App Surveys into your web apps with the Formbricks JS SDK for App Surveys. Learn how to initialize Formbricks, set attributes, track actions, and troubleshoot common issues.",
"Integrate Formbricks App Surveys into your web apps and websites with the Formbricks JS SDK. Learn how to initialize Formbricks, set attributes, track actions, and troubleshoot common issues.",
};
#### Developer Docs
# SDK: Run Surveys Inside Your Web Apps
# SDK: Run Surveys Inside Your Web Apps and Websites
### Overview
The Formbricks JS SDK is a 2-in-1 SDK for seamlessly integrating both App Surveys and Website Surveys into your projects. In this section, we'll explore how to leverage the SDK specifically for **app** surveys. Its available on npm [here](https://www.npmjs.com/package/@formbricks/js/).
The Formbricks JS SDK is a versatile solution for integrating surveys into both web apps and websites. It adapts based on the presence of a `userId`. If a `userId` is provided, the SDK handles authenticated surveys for logged-in users in web apps. If no `userId` is provided, the SDK can still seamlessly run surveys on public-facing websites. The SDK is available on npm [here](https://www.npmjs.com/package/@formbricks/js/).
### Install
@@ -42,18 +42,18 @@ pnpm add @formbricks/js
### Initialize Formbricks
Initialize the Formbricks JS Client for app surveys where you pass the userId (creates a user if not existing in Formbricks) to attribute & target the user based on their actions.
Initialize the Formbricks JS Client for surveys. When used in a web app, pass a `userId` to create and target a specific user. When using it on a website without authentication, simply omit the `userId`.
<Col>
<CodeGroup title="Initialize Formbricks">
```javascript
import formbricks from "@formbricks/js/app";
import formbricks from "@formbricks/js";
formbricks.init({
environmentId: "<your-environment-id>", // required
apiHost: "<your-api-host>", // required
userId: "<user-id>", // required
userId: "<user-id>", // optional
});
```
@@ -73,7 +73,7 @@ if (window !== undefined) {
formbricks.init({
environmentId: "<your-environment-id>",
apiHost: "<your-api-host>",
userId: "<user-id>",
userId: "<user-id>", //optional
});
} else {
console.error("Window object not accessible to init Formbricks");
@@ -87,7 +87,7 @@ if (window !== undefined) {
### Set Attribute
You can set custom attributes for the identified user. This can be helpful for segmenting users based on specific characteristics or properties. To learn how to set custom user attributes, please check out our [User Attributes Guide](/app-surveys/user-identification).
Set custom attributes for the identified user to help segment them based on specific characteristics. This method only works when a `userId` is provided during initialization, allowing for targeted surveys in web apps. To learn how to set custom user attributes, refer to our [User Attributes Guide](/app-surveys/user-identification).
<Col>
<CodeGroup>

View File

@@ -14,13 +14,13 @@ Welcome to the Developer Docs section, your comprehensive resource for integrati
The Formbricks React Native SDK for App Surveys is designed for React Native applications, enabling seamless integration of surveys within your mobile apps. Dive into the documentation to learn how to leverage the SDK for app surveys and engage with your users effectively.
### [SDK: Web Apps](/developer-docs/app-survey-sdk)
### [SDK: Formbricks JS](/developer-docs/js-sdk)
The Formbricks JS SDK tailored for App Surveys is designed for applications where users are logged in, allowing for targeted and identified interactions within Formbricks. This SDK is particularly useful for advanced user tracking, enabling deeper insights into user behavior. Learn how to seamlessly integrate Formbricks into your applications and harness valuable insights from your logged-in users.
The Formbricks JS SDK is a versatile solution for both web apps and public websites. It adapts based on how you provide user information.
### [SDK: Public Websites](/developer-docs/website-survey-sdk)
If a `userId` is provided, the SDK tailors surveys for logged-in users, enabling targeted and identified interactions. This allows for advanced user tracking, providing deeper insights into user behavior within your application.
The Formbricks JS SDK for Website Surveys is ideal for public-facing websites without user authentication. It's recommended for pages with high traffic and no authentication walls, facilitating quick and efficient survey collection. Dive into the documentation to discover how to deploy surveys on your website and effectively engage with your audience.
Alternatively, when no `userId` is supplied, the SDK seamlessly handles surveys for public-facing websites, making it ideal for high-traffic pages without authentication. This enables efficient survey collection without requiring user identification.
### [SDK: Formbricks API](/developer-docs/api-sdk)
@@ -34,7 +34,7 @@ Explore the Formbricks REST API documentation with Postman, providing detailed i
Learn about Formbricks Webhooks and how to set up event-driven notifications in your applications using our UI as well as API. Stay updated with real-time data and trigger actions based on specific response events within your Formbricks environment.
### [Contributing to Formbricks](/developer-docs/contributing)
### [Contributing to Formbricks](/developer-docs/contributing/get-started)
Interested in contributing to the Formbricks ecosystem? This page provides guidance on how to run Formbricks locally, report issues, contribute through code, and collaborate with the Formbricks community to enhance the platform for everyone.

View File

@@ -87,11 +87,11 @@ There are two ways to invite organization members: One by one or in bulk.
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. Click on the `Add Member` button:
2. Click on the `Add member` button:
<MdxImage
src={AddMember}
alt="Add Member Button Position"
alt="Add member Button Position"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
@@ -123,11 +123,11 @@ Formbricks sends an email to the organization member with an invitation link. Th
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. Click on the `Add Member` button:
2. Click on the `Add member` button:
<MdxImage
src={AddMember}
alt="Add Member Button Position"
alt="Add member Button Position"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,45 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import AddImageOrVideoToQuestionImage from "./images/add-image-or-video-to-question-image.webp";
import AddImageOrVideoToQuestionVideo from "./images/add-image-or-video-to-question-video.webp";
import AddImageOrVideoToQuestion from "./images/add-image-or-video-to-question.webp";
#### Add Image or Video to a Question
Enhance your questions by adding images or videos. This makes instructions clearer and the survey more engaging.
## How to Add Images
Click the icon on the right side of the question to add an image or video:
<MdxImage
src={AddImageOrVideoToQuestion}
alt="Overview of adding image or video to question"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Upload an image by clicking the upload icon or dragging the file:
<MdxImage
src={AddImageOrVideoToQuestionImage}
alt="Overview of adding image to question"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
## How to Add Videos
Toggle to add a video via link:
<MdxImage
src={AddImageOrVideoToQuestionVideo}
alt="Overview of adding video to question"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Supported Video Platforms
We support YouTube, Vimeo, and Loom URLs.
<Note>**YouTube Privacy Mode**: This option reduces tracking by converting YouTube URLs to no-cookie URLs. It only works with YouTube.</Note>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -1,136 +1,171 @@
import { MdxImage } from "@/components/MdxImage";
import StepEight from "./images/StepEight.webp";
import StepFive from "./images/StepFive.webp";
import StepFour from "./images/StepFour.webp";
import StepOne from "./images/StepOne.webp";
import StepSeven from "./images/StepSeven.webp";
import StepSix from "./images/StepSix.webp";
import StepThree from "./images/StepThree.webp";
import StepTwo from "./images/StepTwo.webp";
import ActionCalculateOperators from "./images/action-calculate-operators.webp";
import ActionCalculateValue from "./images/action-calculate-value.webp";
import ActionCalculateVariables from "./images/action-calculate-variables.webp";
import ActionCalculate from "./images/action-calculate.webp";
import ActionJump from "./images/action-jump.webp";
import ActionOptions from "./images/action-options.webp";
import ActionRequire from "./images/action-require.webp";
import AddLogic from "./images/add-logic.webp";
import ConditionChaining from "./images/condition-chaining.webp";
import ConditionOperators from "./images/condition-operators.webp";
import ConditionOptions from "./images/condition-options.webp";
import ConditionValue from "./images/condition-value.webp";
import Conditions from "./images/conditions.webp";
import Editor from "./images/editor.webp";
import QuestionLogic from "./images/question-logic.webp";
export const metadata = {
title: "Conditional Logic in Formbricks Surveys",
title: "Conditional Logic",
description:
"Enhance your surveys with Conditional Logic to create a dynamic and responsive survey experience. Guide respondents through different paths based on their answers, ensuring each survey is tailored to the users responses. This feature is applicable for all kinds of surveys!",
"Create complex survey logic with the Logic Editor. Use conditions, actions, and variables to create a personalized survey experience.",
};
# Conditional Logic
# Logic Editor
With Formbricks, enhance your surveys with Conditional Logic to create a dynamic and responsive survey experience. This feature allows you to guide respondents through different paths based on their answers, ensuring each survey is tailored to the users responses. This feature is applicable for all kinds of surveys!
Create complex survey logic with the Logic Editor. Use conditions, actions, and variables to create a personalized survey experience.
### Setting Up Conditional Logic
<MdxImage src={Editor} alt="Logic Editor" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
Conditional Logic can be applied to any question within your survey to direct the flow based on specific responses.
## Terminology
1. **Create or Edit a Question**: Start by adding a new question or editing an existing one within your survey.
- **Condition**: A rule that determines when an action should be executed.
- **Action**: A task that is executed when a condition is met.
## **Creating Logic**
1. **Add a Logic Block**: Click the `Add logic +` button to add a new logic block.
<MdxImage src={AddLogic} alt="Add Logic" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note>
You can add multiple logic blocks to a survey. Logic blocks are executed in the order they are added. You
can rearrange the order of logic blocks.
</Note>
2. **Add Conditions**: Add conditions to the logic block. Conditions are rules that determine when an action should be executed.
<MdxImage
src={StepOne}
alt="Choose a link survey template"
src={Conditions}
alt="Add Conditions"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. **Access Advanced Settings**: Click on **Advanced Settings** beneath the question setup area to access additional configuration options.
Conditons can be based on:
<MdxImage
src={StepTwo}
alt="Choose a link survey template"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
/>
- **Question**: The answer to a question.
- **Variable**: A variable value.
- **Hidden Field**: The value of a hidden field.
3. **Configure Logic Jumps**: Choose **Logic Jumps** to set up conditions that dictate the survey's progression based on responses.
2.a **Condition Options**: Choose from a list of available conditions.
<MdxImage
src={StepThree}
alt="Choose a link survey template"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
/>
### Configuring Logic Conditions
Enhance survey interactivity by setting up triggers based on respondent answers. You can specify different paths for each type of response:
**General Conditions (Available in All Question Types):**
- **Answer Submitted/Skipped**: Initiate different survey paths based on whether a question is answered or skipped.
<MdxImage
src={StepFour}
alt="Choose a link survey template"
src={ConditionOptions}
alt="Condition Options"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
className="max-w-full rounded-lg sm:max-w-3xl"
/>
**Choice-Based Conditions:**
2.b **Condition Operators**: Choose an operator to compare the condition value.
<MdxImage
src={ConditionOperators}
alt="Condition Operators"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2.c **Condition Value**: Enter a value to compare the condition against.
Comparisons can be made against a fixed value or a dynamic value.
Dynamic values can be based on a question, variable, or hidden field.
<MdxImage
src={ConditionValue}
alt="Condition Value"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Note>
- Conditions can be grouped. - Conditions can be combined using AND or OR operators. You can add multiple
conditions to a logic block. Conditions are evaluated in the order they are added.
</Note>
<MdxImage
src={StepFive}
alt="Choose a link survey template"
src={ConditionChaining}
alt="Condition Chaining"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- **One of Multiple Choice Values**: Activate if the answer is among selected options. (Single select and Multi select)
- **Equals: Exactly the Selected Values**: Initiate a jump if the response matches exactly the selected values provided in the options. (Single select and Multi select)
- **Includes All Selected Values**: Activate if all selected values match those chosen by the survey creator. (Multi select only)
3. **Add Actions**: Add actions to the logic block. Actions are tasks that are executed when a condition is met.
**Numeric Conditions (Rating & NPS Questions Only)**
<Note>You can add multiple actions to a logic block. Actions are executed in the order they are added.</Note>
- 3.a **Action Options**: Choose from a list of available actions.
<MdxImage
src={ActionOptions}
alt="Add Actions"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Action is of the following types:
- **Calculate**: Perform a calculation. These variables are then available for use in other questions.
- Calculations can be performed on variables.
- Calculations can be based on fixed values or dynamic values.
<MdxImage
src={ActionCalculateVariables}
alt="Action Calculate Variables"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionCalculateOperators}
alt="Action Calculate Variables"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionCalculateValue}
alt="Action Calculate Variables"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionCalculate}
alt="Action Calculate"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- **Require Answer**: Make a question required. Only the optional questions can be marked as required while filling the survey.
<MdxImage
src={ActionRequire}
alt="Action Require"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- **Jump to Question**: Skip to a specific question. The user will be redirected to the specified question based on the condition.
<MdxImage
src={ActionJump}
alt="Action Jump"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
4. **Save Logic**: Click the `Save` button to save the logic block.
# Question Logic
This logic is executed when the user answers the question. Logic can be as simple as showing a follow-up question based on the answer or as complex as calculating a score based on multiple answers.
<MdxImage
src={StepSix}
alt="Choose a link survey template"
src={QuestionLogic}
alt="Question Logic"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- **Value Comparisons**: Initiate jumps based on numerical criteria—equals, does not equal, less than, less than or equal to, greater than, or greater than equal to.
**Matrix-Specific Conditions**
<MdxImage
src={StepSeven}
alt="Choose a link survey template"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
/>
- **Submission Completeness**: Initiate based on whether the response is completely or partially submitted.
### **Specifying Survey Paths**
After setting conditions, you specify the paths to take when those conditions are met:
- **Jump to a Specific Question**: Direct the respondent to a particular question elsewhere in the survey.
- **Jump to Survey End**: Conclude the survey early based on the respondent's answers.
<MdxImage
src={StepEight}
alt="Choose a link survey template"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl "
/>
### **Multiple Logic Jumps**
You can add multiple Logic Jumps to a single question. These jumps work in an **OR** fashion, meaning any of the conditions can initiate the specified survey path. The logic jumps are evaluated in the **order they are created**, and the first true condition will take precedence.
---
### **Example Scenario**
Suppose youre conducting a survey about technology usage:
1. **Question (Single Select)**: What devices do you use daily?
2. **Answers**: Smartphone, Laptop, Tablet, None
**Logic Jump Setup**:
- If the respondent selects **None**, jump to the end of the survey.
- If the respondent selects **Smartphone**, jump to a question specific to smartphone usage.
This setup allows for a tailored survey experience that adapts to the respondent's input, making your data collection more targeted and efficient.
Thats it! Now go and configure your surveys to bring down your survey fatigue to 0% and ask respondents through customized paths. Enhance their relevance and engagement with your survey, leading to higher quality responses and better data.

View File

@@ -14,8 +14,6 @@ export const metadata = {
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`)
<Note>Hidden fields are now available in the Formbricks in-app and website surveys as well</Note>
## How to Add Hidden Fields
### Enable them in the Survey Builder

View File

@@ -1,171 +0,0 @@
import { MdxImage } from "@/components/MdxImage";
import ActionCalculateOperators from "./images/action-calculate-operators.webp";
import ActionCalculateValue from "./images/action-calculate-value.webp";
import ActionCalculateVariables from "./images/action-calculate-variables.webp";
import ActionCalculate from "./images/action-calculate.webp";
import ActionJump from "./images/action-jump.webp";
import ActionOptions from "./images/action-options.webp";
import ActionRequire from "./images/action-require.webp";
import AddLogic from "./images/add-logic.webp";
import ConditionChaining from "./images/condition-chaining.webp";
import ConditionOperators from "./images/condition-operators.webp";
import ConditionOptions from "./images/condition-options.webp";
import ConditionValue from "./images/condition-value.webp";
import Conditions from "./images/conditions.webp";
import Editor from "./images/editor.webp";
import QuestionLogic from "./images/question-logic.webp";
export const metadata = {
title: "Logic Editor",
description:
"Create complex survey logic with the Logic Editor. Use conditions, actions, and variables to create a personalized survey experience.",
};
# Logic Editor
Create complex survey logic with the Logic Editor. Use conditions, actions, and variables to create a personalized survey experience.
<MdxImage src={Editor} alt="Logic Editor" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
## Terminology
- **Condition**: A rule that determines when an action should be executed.
- **Action**: A task that is executed when a condition is met.
## **Creating Logic**
1. **Add a Logic Block**: Click the `Add logic +` button to add a new logic block.
<MdxImage src={AddLogic} alt="Add Logic" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note>
You can add multiple logic blocks to a survey. Logic blocks are executed in the order they are added. You
can rearrange the order of logic blocks.
</Note>
2. **Add Conditions**: Add conditions to the logic block. Conditions are rules that determine when an action should be executed.
<MdxImage
src={Conditions}
alt="Add Conditions"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Conditons can be based on:
- **Question**: The answer to a question.
- **Variable**: A variable value.
- **Hidden Field**: The value of a hidden field.
2.a **Condition Options**: Choose from a list of available conditions.
<MdxImage
src={ConditionOptions}
alt="Condition Options"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2.b **Condition Operators**: Choose an operator to compare the condition value.
<MdxImage
src={ConditionOperators}
alt="Condition Operators"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2.c **Condition Value**: Enter a value to compare the condition against.
Comparisons can be made against a fixed value or a dynamic value.
Dynamic values can be based on a question, variable, or hidden field.
<MdxImage
src={ConditionValue}
alt="Condition Value"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Note>
- Conditions can be grouped. - Conditions can be combined using AND or OR operators. You can add multiple
conditions to a logic block. Conditions are evaluated in the order they are added.
</Note>
<MdxImage
src={ConditionChaining}
alt="Condition Chaining"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
3. **Add Actions**: Add actions to the logic block. Actions are tasks that are executed when a condition is met.
<Note>You can add multiple actions to a logic block. Actions are executed in the order they are added.</Note>
- 3.a **Action Options**: Choose from a list of available actions.
<MdxImage
src={ActionOptions}
alt="Add Actions"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Action is of the following types:
- **Calculate**: Perform a calculation. These variables are then available for use in other questions.
- Calculations can be performed on variables.
- Calculations can be based on fixed values or dynamic values.
<MdxImage
src={ActionCalculateVariables}
alt="Action Calculate Variables"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionCalculateOperators}
alt="Action Calculate Variables"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionCalculateValue}
alt="Action Calculate Variables"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionCalculate}
alt="Action Calculate"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- **Require Answer**: Make a question required. Only the optional questions can be marked as required while filling the survey.
<MdxImage
src={ActionRequire}
alt="Action Require"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- **Jump to Question**: Skip to a specific question. The user will be redirected to the specified question based on the condition.
<MdxImage
src={ActionJump}
alt="Action Jump"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
4. **Save Logic**: Click the `Save` button to save the logic block.
# Question Logic
This logic is executed when the user answers the question. Logic can be as simple as showing a follow-up question based on the answer or as complex as calculating a score based on multiple answers.
<MdxImage
src={QuestionLogic}
alt="Question Logic"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,36 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import Address from "./images/address.webp";
#### Question Type
# Address
The Address question type allows respondents to input their address details, including multiple fields such as address lines, city, state, and country. You can configure the question by adding a title, an optional description, and toggling specific fields to be required.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/m8w91e8wi52pdao8un1f4twu" />
## Elements
<MdxImage
src={Address}
alt="Overview of Address question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Question
Provide a question to describe the address information you are requesting.
### Description
Optionally, add a description to guide the user.
### Toggle Fields
You can choose to show and require any or all of the following fields in the form:
- Address Line 1
- Address Line 2
- City
- State
- Zip Code
- Country

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -0,0 +1,28 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import Consent from "./images/consent.webp";
#### Question Type
# Consent
The Consent card is used to obtain user agreement regarding a product, service, or policy. It features a bold statement or question as the title, followed by a brief description. At the end of the card, users can confirm their consent by checking a checkbox to indicate their agreement.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/orxp15pca6x2nfr3v8pttpwm" />
## Elements
<MdxImage
src={Consent}
alt="Overview of Consent question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
A bold statement or question asking for user consent, displayed prominently at the top of the card.
### Description
A short explanation or additional context for the consent request, displayed below the title. The text can be formatted, and hyperlinks are allowed within the description.
### Checkbox
At the bottom of the card, users can confirm their agreement by checking the box, indicating their consent to the question or statement above. The label for the checkbox is also editable.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -0,0 +1,36 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import Contact from "./images/contact.webp";
#### Question Type
# Contact Info
The Contact Info question type allows respondents to provide their basic contact information such as name, email, and phone number. You can customize the form with a title, an optional description, and control which fields to display and require.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/z2zjoonfeythx5n6z5qijbsg" />
## Elements
<MdxImage
src={Contact}
alt="Overview of Contact Info question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Specify a title to describe the information you're collecting.
### Description
Optionally, add a description to give additional context.
### Toggle Fields
You can choose to show and require any or all of the following fields:
- First Name
- Last Name
- Email
- Phone Number
- Company

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -0,0 +1,32 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import Date from "./images/date.webp";
#### Question Type
# Date
The Date question type allows respondents to provide a date, such as when they are available or when an event is scheduled. It features a title to guide the respondent on what date to enter, and an optional description to provide further details or context.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/rk844spc8ffls25vzkxzzhse" />
## Elements
<MdxImage
src={Date}
alt="Overview of Date question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Add a clear title to inform the respondent what date you are asking for.
### Description
Provide an optional description with further instructions.
### Date Format
Choose from multiple date formats for the input:
- MM-DD-YYYY
- DD-MM-YYYY
- YYYY-MM-DD

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,34 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import FileUpload from "./images/file-upload.webp";
#### Questions Type
# File Upload
The File Upload question type allows respondents to upload files related to your survey, such as production documents or requirement specifications. It features a title to guide the user on what to upload and an optional description to provide additional context.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/oo4e6vva48w0trn01ht8krwo" />
## Elements
<MdxImage
src={FileUpload}
alt="Overview of Fill Upload question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Add a clear title that informs the respondent about the purpose of the file upload.
### Description
Provide an optional description to give respondents more details or instructions about what files they need to upload.
### Allow Multiple Files
Enable this option to allow respondents to upload multiple files at once.
### Max File Size
You can set a maximum file size limit, and an input box will appear to specify the size in MB.
### File Type Restrictions
You can restrict the allowed file types. An input box will appear where you can specify the file formats, such as `.pdf`, `.jpg`, `.docx`, etc.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,43 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import FreeText from "./images/free-text.webp";
export const metadata = {
title: "Free Text",
description: "Free text questions allow respondents to enter a custom answer.",
};
#### Question Type
# Free Text
Free text questions allow respondents to enter a custom answer. Displays a title and an input field for the respondent to type in.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/cm2b2eftv000012b0l3htbu0a" />
## Elements
<MdxImage
src={FreeText}
alt="Overview of Free Text question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Add a clear title to inform the respondent what information you are asking for.
### Description
Provide an optional description with further instructions.
### Placeholder
Specify a placeholder text to display in the input field.
### Input Type
Choose the type of input field to display. Options include:
- **Text**: A text area input. This can be converted to a single line input field if needed, by toggling the _"Long answer"_ switch at the bottom of the question segment.
- **Email**: A single-line text input that validates the input as an email address.
- **URL**: A single-line text input that validates the input as a URL.
- **Number**: A single-line text input that validates the input as a number and shows "increase" and "decrease" buttons.
- **Phone**: A single-line text input that validates the input as a phone number.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,36 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import Matrix from "./images/matrix.webp";
#### Question Type
# Matrix
Matrix questions allow respondents to select a value for each option presented in rows. The values range from 0 to a user-defined maximum (e.g., 0 to X). The selection is made using radio buttons, and users can choose any value within the defined range, including 0.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/obqeey0574jig4lo2gqyv51e" />
## Elements
<MdxImage
src={Matrix}
alt="Overview of Matrix question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Add a clear title to inform the respondent what information you are asking for.
### Description
Provide an optional description with further instructions.
### Rows
Define the options shown on the left side of the matrix. These represent the items for which users will select a value.
### Columns
Represent the range of values from 0 to X (right side of the screen). Users can choose any value, including 0, using radio buttons.
### Select ordering
- Keep current order: This will keep the order of options the same for all respondents.
- Randomize all: This will randomize the options for each respondent.

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,36 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import MultiSelect from "./images/multi-select.webp";
export const metadata = {
title: "Multi Select",
description: "Multi select questions allow respondents to select several answers from a list",
};
#### Question Type
# Multi Select
Multi select questions allow respondents to select several answers from a list. Displays a title and a list of checkboxes for the respondent to choose from.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/jhyo6lwzf6eh3fyplhlp7h5f" />
## Elements
<MdxImage
src={MultiSelect}
alt="Overview of Multi Select question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Add a clear title to inform the respondent what information you are asking for.
### Description
Provide an optional description with further instructions.
### Options
Define the options shown in the list. These represent the items for which users will select.
Other than the fact that respondents can select multiple options, multi select questions are similar to [single select](/global/question-types/single-select) questions.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,31 @@
import { MdxImage } from "@/components/MdxImage";
import SurveyEmbed from "@/components/SurveyEmbed";
import NetPromoterScore from "./images/net-promoter-score.webp";
#### Question Type
# Net Promoter Score
Net Promoter Score questions allow respondents to rate a question on a scale from 0 to 10. Displays a title and a list of radio buttons for the respondent to choose from.
<SurveyEmbed surveyUrl="https://app.formbricks.com/s/vqmpasmnt5qcpsa4enheips0" />
## Elements
<MdxImage
src={NetPromoterScore}
alt="Overview of Net Promoter Score question type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Title
Add a clear title to inform the respondent what information you are asking for.
### Description
Provide an optional description with further instructions.
### Labels
Add labels for the lower and upper bounds of the score. The default is "Not at all likely" and "Extremely likely".
### Add color coding
Add color coding to the score. This will show a color bar above the score.

Some files were not shown because too many files have changed in this diff Show More