diff --git a/apps/spotlight/src/components/react/form/view.tsx b/apps/spotlight/src/components/react/form/view.tsx index daaa9ea81..9784920b0 100644 --- a/apps/spotlight/src/components/react/form/view.tsx +++ b/apps/spotlight/src/components/react/form/view.tsx @@ -4,6 +4,7 @@ import { FormProvider, useForm } from 'react-hook-form'; import { Prompt, createFormContext, createPrompt } from '@atj/forms'; import { getFormFromStorage } from '../../../lib/form-repo'; import { PromptSegment } from './prompts'; +import { fillPDF } from '@atj/documents'; // Assuming this is the structure of your JSON data export interface Field { @@ -31,7 +32,12 @@ export const FormView = ({ prompt }: { prompt: Prompt }) => { const formMethods = useForm>({}); return ( -
+ { + console.log(data); + //fillPDF(); + })} + >
{prompt.map((promptPart, index) => ( diff --git a/packages/forms/src/index.ts b/packages/forms/src/index.ts index 575af6915..77704a266 100644 --- a/packages/forms/src/index.ts +++ b/packages/forms/src/index.ts @@ -21,6 +21,10 @@ export type Form = { summary: FormSummary; questions: Record; strategy: T; + documents: { + path: string; + fieldMap: Record; + }[]; }; export type FormContext = { @@ -55,6 +59,7 @@ export const createForm = ( return question.id; }), }, + documents: [], }; };