mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-23 22:50:35 -06:00
### New Formbricks Release: Complete Rewrite, New Features & Enhanced UI 🚀 We're thrilled to announce the release of the new Formbricks, a complete overhaul of our codebase, packed with powerful features and an improved user experience. #### What's New: 1. **Survey Builder**: Design and customize your in-product micro-surveys with our intuitive survey builder. 2. **Trigger Micro-Surveys**: Set up micro-surveys to appear at specific points within your app, allowing you to gather feedback when it matters most. 3. **JavaScript SDK**: Our new JavaScript SDK makes integration a breeze - just embed it once and you're ready to go. 4. **No-Code Events**: Set up events and triggers without writing a single line of code, making it accessible for everyone on your team. 5. **Revamped UI**: Enjoy an entirely new user interface that enhances usability and provides a smooth, delightful experience. This release marks a major step forward for Formbricks, enabling you to better understand your users and build an outstanding product experience. Please update your Formbricks integration to take advantage of these exciting new features, and let us know in the Discord if you have any questions or feedback! Happy surveying! 🎉
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import type { OpenTextQuestion } from "./questionTypes";
|
|
import Headline from "./Headline";
|
|
import Subheader from "./Subheader";
|
|
|
|
interface OpenTextQuestionProps {
|
|
question: OpenTextQuestion;
|
|
onSubmit: (id: string) => void;
|
|
lastQuestion: boolean;
|
|
brandColor: string;
|
|
}
|
|
|
|
export default function OpenTextQuestion({
|
|
question,
|
|
onSubmit,
|
|
lastQuestion,
|
|
brandColor,
|
|
}: OpenTextQuestionProps) {
|
|
return (
|
|
<form
|
|
onSubmit={(e) => {
|
|
e.preventDefault();
|
|
const data = "Pupsi";
|
|
onSubmit(data);
|
|
// reset form
|
|
}}>
|
|
<Headline headline={question.headline} questionId={question.id} />
|
|
<Subheader subheader={question.subheader} questionId={question.id} />
|
|
<div className="mt-4">
|
|
<textarea
|
|
rows={3}
|
|
name={question.id}
|
|
id={question.id}
|
|
placeholder={question.placeholder}
|
|
required={question.required}
|
|
className="block w-full rounded-md border border-slate-100 bg-slate-50 p-2 shadow-sm focus:border-slate-500 focus:ring-0 dark:bg-slate-500 dark:text-white sm:text-sm"></textarea>
|
|
</div>
|
|
<div className="mt-4 flex w-full justify-between">
|
|
<div></div>
|
|
<button
|
|
type="submit"
|
|
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
|
|
style={{ backgroundColor: brandColor }}>
|
|
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
);
|
|
}
|