Docs
v1.3.14
GitHubSite

Templates

16 production-ready form schemas included with the free templates package, covering 7 categories.

Free templates

@squaredr/fieldcraft-templates-free includes 16 production-ready schemas. These are MIT-licensed — use them in any project.

pnpm add @squaredr/fieldcraft-templates-free

Available templates

General

TemplateDescriptionFieldsSections
contactFormContact/inquiry formMulti-section with name, email, message2
newsletterSignupEmail list signupSingle-section with email and preferences1
eventRegistrationEvent signupAttendee details, dietary requirements, sessions3
leadGenerationLead captureCompany info, budget, timeline2
pollQuick opinion pollSingle question with options1
quizKnowledge/personality quizScored questions with result bands3+

Feedback

TemplateDescriptionFieldsSections
feedbackSurveyCustomer feedback collectionRating, NPS, open text2
npsSurveyNet Promoter Score surveyNPS scale with follow-up2
featureRequestFeature voting/requestsDescription, priority, impact2

Support

TemplateDescriptionFieldsSections
bugReportBug/issue reportingSteps to reproduce, environment, severity3

HR

TemplateDescriptionFieldsSections
jobApplicationEmployment applicationPersonal info, experience, references4
onboardingChecklistNew hire checklistTasks, document uploads, acknowledgements3
exitInterviewDeparture interviewSatisfaction ratings, reasons, feedback3
review360360-degree feedback reviewCompetency ratings, open feedback4
timeOffRequestPTO/vacation requestDates, type, coverage plan1
expenseReportExpense submissionLine items, receipts, approvals2

Usage

Each template exports a schema, metadata, and a combined template object:

import { contactForm } from '@squaredr/fieldcraft-templates-free'

// The schema — pass directly to FormRenderer
contactForm.schema   // FormEngineSchema

// Metadata
contactForm.meta     // { id, name, description, category, fieldCount, sectionCount, tags }

// Or import individually
import { contactFormSchema, contactFormMeta } from '@squaredr/fieldcraft-templates-free'

Render a template

import { FormRenderer } from '@squaredr/fieldcraft-react'
import { contactForm } from '@squaredr/fieldcraft-templates-free'

export default function ContactPage() {
  return (
    <FormRenderer
      schema={contactForm.schema}
      onSubmit={async (response) => {
        await fetch('/api/submit', { method: 'POST', body: JSON.stringify(response) })
      }}
    />
  )
}

List all templates

import { allTemplates } from '@squaredr/fieldcraft-templates-free'

// allTemplates is Template[] — all 16 templates
allTemplates.forEach((t) => {
  console.log(t.meta.name, t.meta.category, t.meta.fieldCount)
})

Template categories

type TemplateCategory =
  | 'general'
  | 'feedback'
  | 'marketing'
  | 'support'
  | 'hr'
  | 'ecommerce'
  | 'healthcare'

Customising templates

Templates are standard FormEngineSchema objects. Copy and modify them:

import { contactForm } from '@squaredr/fieldcraft-templates-free'

const myContactForm = {
  ...contactForm.schema,
  id: 'my-contact-form',
  title: 'Get in Touch',
  branding: {
    logoUrl: '/my-logo.png',
    poweredBy: false,
  },
}

Next steps

On this page