avo-hq/avo

Make action forms better

開放

#2,670 建立於 2024年4月9日

 (3 則留言) (0 個反應) (1 位負責人)Ruby (308 個分叉)user submission
EnhancementHelp wantedJavascript

倉庫指標

星標
 (1,778 顆星)
PR 合併指標
 (平均合併 1天 6小時) (30 天內合併 67 個 PR)

描述

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

貢獻者指南