Skip to content

Conversation

flexponsive
Copy link
Contributor

Adds support for dynamic root-level form properties in Vue and Svelte, matching existing React behavior. Properties can be added after initialization, which helps avoid pre-defining every possible field on create pages and supports temporary values like “type your username to confirm.”

Changes

  • Update form.data() in Vue and Svelte to track all form properties, including those added at runtime, not only those defined at initialization.
  • Update example pages to demonstrate dynamic properties.
  • Add Playwright tests for dynamic root-level and nested properties in all adapters.

Motivation
Fixes #968 and follows discussion #859. Ensures consistent behavior across adapters.

@flexponsive flexponsive marked this pull request as ready for review August 12, 2025 04:57
@flexponsive flexponsive force-pushed the feature/dynamic-form-propeties branch from b152614 to 8ac4f49 Compare August 14, 2025 09:10
@flexponsive flexponsive force-pushed the feature/dynamic-form-propeties branch from b0a9c40 to edad771 Compare August 14, 2025 13:30
@flexponsive
Copy link
Contributor Author

@pascalbaljet Thanks for all the recent work on improving the forms, especially the TypeScript support — the new type checks for form fields are a big robustness win.

That said, in JavaScript apps the long-standing issue remains: form fields added at runtime are still silently dropped in data() for Vue and Svelte. This is orthogonal to the TypeScript improvements and could be resolved with a very small code change, as suggested here.

Would you be open to a PR along these lines? I can take care of the test app updates across all adapters and ensure no backward-compatibility issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic properties in form
1 participant