feat: replace inputs with textareas in admin form and add URL auto-linking support for form labels and options

This commit is contained in:
2026-06-05 18:24:51 +07:00 Unverified
parent f3dd658304
commit 28ed423ae6
2 changed files with 42 additions and 7 deletions
+4 -4
View File
@@ -286,11 +286,11 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC
<CardContent className="pt-6 space-y-4">
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-4">
<div className="flex-1 w-full">
<Input
<Textarea
value={q.label}
onChange={(e) => handleUpdateQuestion(q.id, { label: e.target.value })}
placeholder="Question Text"
className="font-medium text-base w-full"
className="font-medium text-base w-full min-h-10 py-2"
/>
</div>
<div className="flex items-center gap-2 self-end sm:self-auto">
@@ -384,10 +384,10 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC
{(q.options || []).map((opt, optIdx) => (
<div key={optIdx} className="flex items-center gap-2">
<span className="w-2 h-2 rounded-full bg-muted-foreground" />
<Input
<Textarea
value={opt}
onChange={(e) => handleUpdateOption(q, optIdx, e.target.value)}
className="h-8 max-w-sm"
className="min-h-10 max-w-sm py-2"
/>
<Button
variant="ghost"