← Back to all products

Form Template Library

$19

21 ready-to-use form templates from contact forms to checkout flows in pure Python.

📁 10 files
JSONMarkdownPython

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 10 files

form-template-library/ ├── LICENSE ├── README.md ├── examples/ │ └── template_usage.json ├── free-sample.zip ├── guide/ │ ├── 01_features.md │ ├── 02_cli-reference.md │ ├── 03_programmatic-usage.md │ └── 04_file-structure.md ├── index.html └── src/ └── form_template_library.py

📖 Documentation Preview README excerpt

Form Template Library

21 ready-to-use form templates — from contact forms to checkout flows. Render to HTML or export as JSON. Pure Python, zero dependencies.

Part of the [Form Forge](https://form-forge.codevault.dev) toolkit by CodeVault.

Features

  • 21 built-in templates: contact, registration, login, checkout, feedback, newsletter, support ticket, job application, event registration, survey, password reset, profile edit, booking, referral, quote request, bug report, waitlist, donation, shipping address, invite, settings
  • HTML rendering: generate complete, styled HTML forms ready to embed
  • JSON export: export template definitions for integration with other tools
  • Batch export: export all templates to a directory at once
  • Customizable: templates are data structures you can modify before rendering
  • Python 3.10+ stdlib only — no pip installs required

Quick Start


# List all available templates
python src/form_template_library.py --list

# Render a template to HTML
python src/form_template_library.py --render contact

# Export a template as JSON
python src/form_template_library.py --json registration

# Render to file
python src/form_template_library.py --render checkout --output checkout.html

# Export all templates to a directory
python src/form_template_library.py --export-all ./exported_templates/

CLI Reference

FlagDescription
--listList all available template names
--render TEMPLATERender a template to HTML
--json TEMPLATEExport a template definition as JSON
--export-all DIRExport all templates as JSON to a directory
--output FILEWrite output to a file instead of stdout

Available Templates

TemplateDescriptionFields
contactBasic contact formname, email, subject, message
registrationUser sign-upusername, email, password, confirm_password
loginSign-in formemail, password, remember_me
checkoutPayment/order formname, email, card_number, expiry, cvv, address
feedbackProduct/service feedbackname, email, rating, category, comments
newsletterEmail subscriptionemail, first_name, interests
support_ticketCustomer supportname, email, priority, category, description
job_applicationEmployment applicationname, email, phone, position, resume, cover_letter
event_registrationEvent sign-upname, email, event, ticket_type, dietary
survey_basicSimple survey formname, satisfaction, recommend, comments
password_resetPassword recoveryemail
profile_editProfile settingsdisplay_name, email, bio, avatar, website

... continues with setup instructions, usage examples, and more.

📄 Code Sample .py preview

src/form_template_library.py #!/usr/bin/env python3 """ Form Template Library — 20+ Ready-to-Use Form Templates ========================================================= A collection of production-ready form templates covering the most common use cases: contact, registration, checkout, feedback, application, survey, and more. Each template includes field definitions, validation rules, and sample HTML output. Part of the Form Forge toolkit by DataNest. License: MIT """ from __future__ import annotations import argparse import html import json import logging import os import sys from dataclasses import dataclass, field from typing import Any logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") logger = logging.getLogger(__name__) # --------------------------------------------------------------------------- # Template registry # --------------------------------------------------------------------------- TEMPLATES: dict[str, dict[str, Any]] = { "contact": { "name": "Contact Form", "description": "Simple contact form with name, email, subject, and message.", "fields": [ {"name": "name", "type": "text", "label": "Full Name", "required": True, "autocomplete": "name"}, {"name": "email", "type": "email", "label": "Email Address", "required": True, "autocomplete": "email"}, {"name": "subject", "type": "text", "label": "Subject", "maxLength": 120}, {"name": "message", "type": "textarea", "label": "Message", "required": True, "minLength": 10, "maxLength": 2000}, ], }, "registration": { "name": "User Registration", "description": "Account signup with username, email, password, and terms acceptance.", "fields": [ {"name": "username", "type": "text", "label": "Username", "required": True, "minLength": 3, "maxLength": 30, "pattern": "^[a-zA-Z0-9_-]+$"}, {"name": "email", "type": "email", "label": "Email", "required": True, "autocomplete": "email"}, {"name": "password", "type": "password", "label": "Password", "required": True, "minLength": 8}, {"name": "confirm_password", "type": "password", "label": "Confirm Password", "required": True}, {"name": "terms", "type": "checkbox", "label": "I agree to the Terms of Service", "required": True}, # ... 438 more lines ...
Buy Now — $19 Back to Products