feat: enable form submission without schema#12
Merged
RobertBoes merged 6 commits intomainfrom Apr 3, 2026
Merged
Conversation
…chema submitForm now accepts FormSchema | SubmitConfig as its second argument. SubmitConfig only requires submitUrl, with optional honeypotField and botProtection. This enables submission without fetching the schema.
Make publicKey optional on FormClientOptions; when absent, submit() constructs a SubmitConfig from formId + API_BASE_URL plus the new botProtection/honeypotField options instead of auto-fetching the schema. Cached schema still takes precedence when available.
The composable now always creates a client (createForm handles optional publicKey). submit() works without a schema — the client constructs the URL from formId. canSubmit and bot protection watcher fall back to options.botProtection when no schema exists.
Both Vue and Nuxt components now accept botProtection and honeypotField as optional props for manual form building without a schema.
- Restore Task 3 composable changes (always-create client, submit guard, botProtection fallback) that were lost during Task 4 subagent stash - Forward botProtection and honeypotField through Nuxt composable to Vue composable - Add comment explaining validate is skipped in schema-less mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
publicKeyis now optional oncreateForm— when omitted,submit()constructs the URL fromformIdand the API base URL (https://formrelay.app/api/v1/form/{formId})botProtectionandhoneypotFieldoptions oncreateForm,useFormRelay, and both<FormRelay>components for SDK-managed bot protection and honeypot without a schema fetchUsage
Test plan
submitFormacceptsSubmitConfiginstead of fullFormSchema(2 new tests)createFormsubmits without publicKey using constructed URL (3 new tests)canSubmitrespectsoptions.botProtectionwithout schema