Skip to content

Make action forms better #2670

Open
Open
@yorsant

Description

@yorsant

Feature

  • Create a stimulus controller that disables the submit form until all required fields have content.
  • Associate fields with errors coming from the backend and render errors before calling the handle method (as suggested by Paul Bob on Discord).

Current workarounds

def handle...
  if some_field.blank?
    error "Something happened"
    keep_modal_open
    return
  end
end

Additional context

https://discord.com/channels/740892036978442260/1226288821780484137

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNot necessarily a feature, but something has improvedHelp wantedWe could use some help with thisJavascriptPull requests that update Javascript code

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions