Skip to content

FOLLOW-UP: Wrap Click-To-Edit "Edit" button in form for Tier 1 fallback (from PR #59) #66

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #59.

Source PR: #59
PR Title: feat: add patterns example app — Session 1 (scaffold + forms #1-7)
Suggested by: @Copilot
Comment type: review comment on patterns/templates/forms/click-to-edit.tmpl

Task Description

In view mode, the "Edit" button is not inside a <form method="POST">, so the Tier 1 (no-JS) fallback can't submit an action to reach the Edit() handler. Per the repo's Tier 1 guidance (CLAUDE.md), actions should be routed via standard form submissions + button names.

Proposed fix: Wrap the button in a POST form (or use a button with a form="..." attribute pointing at a POST form).

Original Comment

In view mode the "Edit" button is not inside a <form method="POST">, so Tier 1 (no-JS) fallback can't submit an action to reach the Edit() handler. Per the repo's Tier 1 guidance (CLAUDE.md:7-21, 49-55), actions should be routed via standard form submissions + button names. Wrap the button in a POST form (or use a button with a form="..." attribute pointing at a POST form).

<form method="POST">
    <button name="edit">Edit</button>
</form>

This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions