diff --git a/app/forms/actionless/form.tsx b/app/forms/actionless/form.tsx
new file mode 100644
index 0000000..2efb1e8
--- /dev/null
+++ b/app/forms/actionless/form.tsx
@@ -0,0 +1,34 @@
+'use client'
+
+import { useForm } from '@'
+import { actionlessSchema } from './schema'
+
+export const ActionlessForm = () => {
+ const { connect, bindField, isPending, fieldErrors } = useForm({
+ schema: actionlessSchema,
+ onSubmit: async (values) => {
+ console.log('Submitting form with values:', values)
+ return true
+ }
+ })
+
+ return (
+
+ )
+}
diff --git a/app/forms/actionless/schema.ts b/app/forms/actionless/schema.ts
new file mode 100644
index 0000000..118c443
--- /dev/null
+++ b/app/forms/actionless/schema.ts
@@ -0,0 +1,7 @@
+import { z } from 'zod'
+
+export const actionlessSchema = z.object({
+ name: z.string().min(3, 'Name must be at least 3 characters'),
+ message: z.string().min(10, 'Message must be at least 10 characters'),
+ attachment: z.instanceof(File).nullable()
+})
diff --git a/app/forms/example/form.tsx b/app/forms/example/form.tsx
index 6890391..c5dd519 100644
--- a/app/forms/example/form.tsx
+++ b/app/forms/example/form.tsx
@@ -4,7 +4,7 @@ import { useForm } from '@'
import { exampleAction } from './action'
import { exampleSchema } from './schema'
-export const HelloForm = () => {
+export const ExampleForm = () => {
const { connect, bindField, isPending, error, fieldErrors, response } =
useForm({
action: exampleAction,
diff --git a/app/forms/hello/form.tsx b/app/forms/hello/form.tsx
index 1dce48b..5dfde71 100644
--- a/app/forms/hello/form.tsx
+++ b/app/forms/hello/form.tsx
@@ -51,6 +51,7 @@ export const HelloForm = ({
})
console.log({ fieldErrors })
+ const contacts = getField('contacts') || []
return (