V
VoiceForm Docs
← Back to VoiceForm
Interactive Integration Builder

1-Line Script Generator

Configure your target form, environment, and brand colors below. VoiceForm automatically generates the exact 1-line copy-paste snippet for your platform.

Paste before the closing </body> tag on any web page.
Use all to cover every form on the page, or a specific CSS selector like #booking-form.
Button Preview:
Used for origin authorization checking in production.
Off by default: VoiceForm fills the fields and leaves the Submit button to the user. Check this to add data-auto-submit="true" so a spoken "Done" submits the form once required fields are filled.
Generated HTML Snippet
<script src="https://voiceformpro.com/widget.js" data-target="all" data-color="red" defer></script>
πŸ’‘ Installation: Paste this script tag directly before the closing </body> tag on your website. It automatically handles forms, dropdowns, dates, and mic UI.

⚑ Test on Any Website Instantly (Browser Console)

Zero Code Changes

You can test VoiceForm right now on your live website (or any form) without changing your codebase or deploying. Open your website in Chrome, Safari, or Edge, press F12 (or right click → Inspect → Console), and paste:

const s = document.createElement('script');
s.src = 'https://voiceformpro.com/widget.js';
s.setAttribute('data-target', 'all');
s.setAttribute('data-auto-submit', 'false');
document.body.appendChild(s);

The VoiceForm microphone button will instantly appear next to all forms on the page. Click and speak into your microphone to test form autofill, dropdown resolution, and date parsing on your live forms immediately.

Built-in Form Control Intelligence

VoiceForm isn't limited to simple text fields. It automatically recognizes complex native controls and resolves natural speech into machine-valid values:

πŸ“… Date Pickers (<input type="date">)

HTML5 date pickers require strict YYYY-MM-DD format. VoiceForm parses spoken relative phrases like "tomorrow", "next Tuesday", or "Nov 3rd" and populates the browser date picker seamlessly.

⏰ Time Pickers (<input type="time">)

Converts spoken times (e.g. "2pm", "2:30 PM", "morning", "afternoon") into valid 24-hour HH:MM notation accepted by native browser time inputs.

πŸ—ΊοΈ Dropdowns & US States (<select>)

Bi-directional normalization: saying "state is IL" resolves to Illinois, and saying "Illinois" matches value="IL". Also handles tokenized choices (e.g. "in person" matches in_person).

πŸ”˜ Multiple Choice & Radio Groups (<input type="radio">)

VoiceForm groups radio options by name and evaluates enclosing <fieldset> <legend> questions. When a user says "select cloud deployment" or "choose option B", VoiceForm checks the matching radio and unchecks siblings.

β˜‘οΈ Checkboxes & Multi-Select (<input type="checkbox">)

Supports both single boolean checkboxes (e.g. "agree to terms") and multi-select checkbox groups (e.g. "add single sign-on, audit logs, and 99.99% SLA"). Flashes green on selection and dispatches native change events.

🌐 Surrounding Website & Question Context Scanning

VoiceForm automatically scans surrounding DOM context (page title, meta descriptions, section headers, question text, and <legend> prompts) and passes it to Claude Haiku. The AI understands the full domain context and technical options before resolving the user's speech into JSON.

πŸš€ Optional Auto-Submit (Default: Off)

By default VoiceForm only fills in the fields; the visitor reviews and clicks Submit. To let a spoken "Done" or "Submit" submit the form (once required fields are filled), opt in with data-auto-submit="true" on the script or form, or VoiceForm.setAutoSubmit(true).

πŸŽ™οΈ Cloud Speech Recognition (Same in Every Browser) & Zero-Click VAD

Audio is captured the same way in Chrome, Firefox, Safari, and Edge and transcribed by Whisper large-v3-turbo on Cloudflare Workers AI, biased with your form's field labels and option names. Text streams into the speech box while the user talks, and a final full-accuracy pass runs when they stop. Voice Activity Detection finalizes after a natural pause, so no second click is needed.

πŸ“‹ Show Dropdown Options by Voice

Say "what are the options for state" or "show me the pet types". The choices appear as tap-able chips in the widget popup, and a native <select> expands inline in the form with a border around it. Tap a choice or just say it. (Browsers do not allow scripts to open the native dropdown popup without a real click, so the inline list is the reliable equivalent.)

🟩 Border-Only Field Highlighting

Filled fields get a green border, changed fields orange, and missing required fields red. The field background is never altered, so highlights stay readable on dark websites. VoiceForm is silent: guidance is shown as short text such as "3 required fields left. Next: Phone".

JavaScript Programmatic API

For Single Page Applications (Next.js, React, Vue, Svelte) or dynamic tabbed forms, control VoiceForm directly via window.VoiceForm:

// 1. Attach to a specific form with custom color
window.VoiceForm.attach('#booking-form', { color: '#dc2626' });

// 2. Cover all forms on the page
window.VoiceForm.attachAll();

// 3. Change button color dynamically
window.VoiceForm.setColor('#2563eb');

// 4. Inspect currently bound active form
const activeForm = window.VoiceForm.getActiveForm();

// 5. Programmatic Voice Controls
window.VoiceForm.start(); // Start listening
window.VoiceForm.stop(); // Stop listening & process

// 6. Opt in to Auto-Submit Programmatically (Default is false)
window.VoiceForm.setAutoSubmit(true); // Turn on auto-submit
console.log(window.VoiceForm.isAutoSubmit()); // Returns false