feat: add support for {update} template variable to track and display submission changes

This commit is contained in:
2026-07-03 22:04:19 +07:00 Unverified
parent 248d6dc083
commit 6996b2405e
2 changed files with 21 additions and 4 deletions
+3 -3
View File
@@ -192,7 +192,7 @@ export default function FormExtraClient({ form }: FormExtraClientProps) {
/>
</div>
<div className="space-y-2">
<Label htmlFor="webhook-template">New Submission Template</Label>
<Label htmlFor="webhook-template">New Submission</Label>
<Textarea
id="webhook-template"
value={webhookTemplate}
@@ -205,7 +205,7 @@ export default function FormExtraClient({ form }: FormExtraClientProps) {
</p>
</div>
<div className="space-y-2">
<Label htmlFor="webhook-update-template">Update Submission Template</Label>
<Label htmlFor="webhook-update-template">Update Submission</Label>
<Textarea
id="webhook-update-template"
value={webhookUpdateTemplate}
@@ -214,7 +214,7 @@ export default function FormExtraClient({ form }: FormExtraClientProps) {
className="min-h-24"
/>
<p className="text-sm text-muted-foreground">
Used when a user updates their existing submission. Use <code>{`{1}`}</code>, <code>{`{2}`}</code> for answers, and <code>{`{username}`}</code>, <code>{`{displayname}`}</code>, <code>{`{id}`}</code> for user info.
Used when a user updates their existing submission. Use <code>{`{1}`}</code>, <code>{`{2}`}</code> for answers, <code>{`{update}`}</code> to show what was changed, and <code>{`{username}`}</code>, <code>{`{displayname}`}</code>, <code>{`{id}`}</code> for user info.
</p>
</div>
</CardContent>