avo-hq/avo

Make action forms better

Aperta

#2670 aperta il 9 apr 2024

 (3 commenti) (0 reazioni) (1 assegnatario)Ruby (308 fork)user submission
EnhancementHelp wantedJavascript

Metriche repository

Star
 (1778 stelle)
Metriche merge PR
 (Merge medio 1g 6h) (67 PR mergiate in 30 g)

Descrizione

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

Guida contributor