Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make action forms better #2670

Open
yorsant opened this issue Apr 9, 2024 · 1 comment
Open

Make action forms better #2670

yorsant opened this issue Apr 9, 2024 · 1 comment
Labels
Enhancement New feature or request Help wanted We could use some help with this Javascript Pull requests that update Javascript code

Comments

@yorsant
Copy link

yorsant commented Apr 9, 2024

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

@adrianthedev adrianthedev added Enhancement New feature or request Javascript Pull requests that update Javascript code Help wanted We could use some help with this labels Apr 14, 2024
@adrianthedev
Copy link
Collaborator

Maybe use something like this?
https://github.com/marcoroth/formulus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Help wanted We could use some help with this Javascript Pull requests that update Javascript code
Projects
Status: No status
Development

No branches or pull requests

2 participants