Files
formbricks/packages/js/app.html
Matti Nannt 0a08d7df68 chore: Introduce unified survey UI package @formbricks/surveys (#698)
* add vite survey package

* add renderSurvey method

* add all survey components

* First working version of renderSurvey

* integrate survey package into survey preview

* add survey modal functionality to formbricks-surveys

* fix build errors and add new template types

* add response queue

* add simple formbricks-js integration

* add local state management for surveys

* add local storage to multiple choice and open text questions

* add local state to other question types, layout fixes

* Fix modal close button, clean js package code

* add new calculate progress function

* fix progressbar on thankyou card

* fix churn survey branching in demo product

* use tsup to bundle @formbricks/js

* update survey positioning in link surveys

* fix preview reset button in link survey

* change logic for progress bar

* update progressbar logic

* update spacing

* add conditional autofocus / disable for iframe

* add userId to link survey

* integrated email verification

* moved token verification and reading to server component

* ran pnpm format

* added question prefilling

* ran pnpm format

* Moved question prefilling logic to Link Survey

* Refactor types

* centralize survey package props, fix build errors

* fix userId in link survey

* fix survey closed message

* add redirect on complete, fix bugs

* smaller bugfixes

* smaller bugfixes

* fix bugs

* fix build errors

* remove logs

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2023-09-10 14:06:55 +09:00

27 lines
886 B
HTML

<head>
<!-- <script src="./dist/index.umd.js" charset="UTF-8"></script>
<script>
window.formbricks.init("clehf2m1d0001yz5vysjpn9qf", "http://localhost:3000");
</script> -->
<script type="text/javascript">
!(function () {
var t = document.createElement("script");
(t.type = "text/javascript"), (t.async = !0), (t.src = "/dist/index.umd.js");
var e = document.getElementsByTagName("script")[0];
e.parentNode.insertBefore(t, e),
setTimeout(function () {
window.formbricks = window.js;
window.formbricks.init({
environmentId: "clm7aw5qf000319w7ithh7ntm",
apiHost: "http://localhost:3000",
debug: true,
});
}, 500);
})();
</script>
</head>
<body style="background-color: #fff">
<p>This is my sample page using the Formbricks JS javascript widget</p>
</body>