diff --git a/apps/web/src/app/(signing)/sign/[token]/email-field.tsx b/apps/web/src/app/(signing)/sign/[token]/email-field.tsx
new file mode 100644
index 000000000..05c1cb31c
--- /dev/null
+++ b/apps/web/src/app/(signing)/sign/[token]/email-field.tsx
@@ -0,0 +1,96 @@
+'use client';
+
+import { useTransition } from 'react';
+
+import { useRouter } from 'next/navigation';
+
+import { Loader } from 'lucide-react';
+
+import { Recipient } from '@documenso/prisma/client';
+import { FieldWithSignature } from '@documenso/prisma/types/field-with-signature';
+import { trpc } from '@documenso/trpc/react';
+import { useToast } from '@documenso/ui/primitives/use-toast';
+
+import { useRequiredSigningContext } from './provider';
+import { SigningFieldContainer } from './signing-field-container';
+
+export type EmailFieldProps = {
+ field: FieldWithSignature;
+ recipient: Recipient;
+};
+
+export const EmailField = ({ field, recipient }: EmailFieldProps) => {
+ const router = useRouter();
+
+ const { toast } = useToast();
+
+ const { email: providedEmail } = useRequiredSigningContext();
+
+ const [isPending, startTransition] = useTransition();
+
+ const { mutateAsync: signFieldWithToken, isLoading: isSignFieldWithTokenLoading } =
+ trpc.field.signFieldWithToken.useMutation();
+
+ const {
+ mutateAsync: removeSignedFieldWithToken,
+ isLoading: isRemoveSignedFieldWithTokenLoading,
+ } = trpc.field.removeSignedFieldWithToken.useMutation();
+
+ const isLoading = isSignFieldWithTokenLoading || isRemoveSignedFieldWithTokenLoading || isPending;
+
+ const onSign = async () => {
+ try {
+ await signFieldWithToken({
+ token: recipient.token,
+ fieldId: field.id,
+ value: providedEmail ?? '',
+ isBase64: false,
+ });
+
+ startTransition(() => router.refresh());
+ } catch (err) {
+ console.error(err);
+
+ toast({
+ title: 'Error',
+ description: 'An error occurred while signing the document.',
+ variant: 'destructive',
+ });
+ }
+ };
+
+ const onRemove = async () => {
+ try {
+ await removeSignedFieldWithToken({
+ token: recipient.token,
+ fieldId: field.id,
+ });
+
+ startTransition(() => router.refresh());
+ } catch (err) {
+ console.error(err);
+
+ toast({
+ title: 'Error',
+ description: 'An error occurred while removing the signature.',
+ variant: 'destructive',
+ });
+ }
+ };
+
+ return (
+
+ {isLoading && (
+
+
+
+ )}
+
+ {!field.inserted && (
+ Email
+ )}
+
+ {field.inserted && {field.customText}
}
+
+ );
+};
diff --git a/apps/web/src/app/(signing)/sign/[token]/page.tsx b/apps/web/src/app/(signing)/sign/[token]/page.tsx
index 9fd1c3a51..35621068a 100644
--- a/apps/web/src/app/(signing)/sign/[token]/page.tsx
+++ b/apps/web/src/app/(signing)/sign/[token]/page.tsx
@@ -14,6 +14,7 @@ import { ElementVisible } from '@documenso/ui/primitives/element-visible';
import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer';
import { DateField } from './date-field';
+import { EmailField } from './email-field';
import { SigningForm } from './form';
import { NameField } from './name-field';
import { SigningProvider } from './provider';
@@ -87,6 +88,9 @@ export default async function SigningPage({ params: { token } }: SigningPageProp
.with(FieldType.DATE, () => (
))
+ .with(FieldType.EMAIL, () => (
+
+ ))
.otherwise(() => null),
)}