sveltejs / sveltejs/kit

instance.fields.value() not getting value from submitter

Open
#15,908 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

forms
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

Remote form enhance callback does not get the value from the submit button in instance.fields.value(). Repro linked below shows that the remote handler gets the value, but not the enhance callback. The submitter value was present in the deprecated data value prior to 2.61.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-wd3pxphe?file=src%2Froutes%2Fform.remote.ts

Logs

System Info
System:
    OS: Linux 5.15 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
    CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
    Memory: 25.66 GB / 31.16 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 24.9.0 - /home/lettucebowler/.volta/tools/image/node/24.9.0/bin/node
    npm: 11.6.0 - /home/lettucebowler/.volta/tools/image/node/24.9.0/bin/npm
    pnpm: 10.30.3 - /home/lettucebowler/.volta/bin/pnpm
    bun: 1.2.2 - /home/lettucebowler/.bun/bin/bun
  npmPackages:
    @sveltejs/adapter-auto: ^7.0.1 => 7.0.1 
    @sveltejs/kit: ^2.57.0 => 2.61.1 
    @sveltejs/vite-plugin-svelte: ^7.0.0 => 7.1.2 
    svelte: ^5.55.2 => 5.55.9 
    vite: ^8.0.7 => 8.0.14
Severity

blocking an upgrade

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in src/routes/form.remote.ts and compare the remote handler with the enhance callback's instance.fields.value() behavior. Verify that the submit button's value is available in the enhance callback, matching the remote handler and the pre-2.61 deprecated data value behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.