Build form_data from field names only (remove id-based form fields)

MA
5h ago
+167-439

Follows reflex-dev/reflex#7386 (merged), which deprecates id-based form fields in 0.10.1. This PR removes them for 0.11.0.

Breaking changes

  • Form data comes only from each control's name. The submit handler no longer reads the values of controls with an id from their refs. An id no longer adds a field, and no longer replaces the value submitted under an equal name. Before, a control with both was submitted twice.
  • name[] fields reach dict handlers as lists. A dict (or unannotated) handler now receives the values of a field such as a two-thumb slider's range[] as a list, not just the last value.

Other changes

  • Remove the machinery that existed only to feed id refs:
    • Form._get_form_refs, its _get_vars override, and the getRefValue/getRefValues imports. The state.js helpers stay, because published reflex-components-core releases still import them (#7391 tracks removing them before 1.0).
    • The _get_all_refs / _form_control_source delegation on auto-memo passthrough bodies and page wrappers.
    • The redundant children swap in passthrough memo compilation.
    • The id-ref argument of getFormData.
  • TypedDict submit validation now matches only static names.
  • The compile-time warning about controls with a static id but no name stays, as a plain warning that their value is not submitted.
  • Root reflex now requires reflex-components-core >= 0.10.1.dev0. Without the memo delegation, a core that still collects id refs would silently miss id fields inside memoized subtrees.

The first commit reverts the commit of #7386 that added the deprecation path. This PR keeps that PR's deprecation fragment, which will already be in the 0.10.1 changelog when this lands.

Before merging: if a reflex-components-core release containing #7386 but not this PR is cut first, raise the root reflex floor on reflex-components-core to that release's next .dev0. Such a release still collects id refs, so it must not pair with this reflex. No such release exists yet.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

🤖 Generated with Claude Code

https://claude.ai/code/session_01TmumE4Q7EpbbSpvEAAoqZ6