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

贡献者指南