avo-hq/avo

Make action forms better

Offen

#2.670 geöffnet am 09.04.2024

 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Ruby (308 Forks)user submission
EnhancementHelp wantedJavascript

Repository-Metriken

Stars
 (1.778 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 6h) (67 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide