Skip to content

Form spread with a remote function doesn't include data on the submit button in the request #14466

@peterreeves

Description

@peterreeves

Describe the bug

Forms that have a name & value pair on the submit button don't seem to include the data if the form function is spread into the form, but it works if you specify the method and action.

Reproduction

https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-xmm4jmhs?file=src%2Froutes%2F%2Bpage.svelte

Clicking "Delete A" shows a validation error.
Clicking "Delete B" works, and prints a message on the server console.

Logs

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 15.56 GB / 31.91 GB
  Binaries:
    Node: 22.17.1 - C:\Program Files\nodejs\node.EXE
    npm: 11.5.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.5 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @sveltejs/adapter-node: ^5.2.13 => 5.2.13
    @sveltejs/adapter-static: ^3.0.8 => 3.0.8
    @sveltejs/kit: ^2.26.1 => 2.26.1
    @sveltejs/vite-plugin-svelte: ^6.1.0 => 6.1.0
    svelte: ^5.36.17 => 5.38.5
    vite: ^7.0.6 => 7.0.6

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions