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

Better/Clearer documentation for abpAjaxForm/data-ajaxForm related to form validation/exception handling #19572

Open
1 task done
matheusware opened this issue Apr 17, 2024 · 1 comment

Comments

@matheusware
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I happened to have to "render the form myself", as mentioned in the Forms Validation documentation, while developing a page. I noticed that exceptions for posted forms trigger a full .NET exception screen instead of the SweetAlert popup error message that is shown when you use a form inside a modal. After some (not insignificant) amount time searching online, I arrived at a Stack Overflow answer that pointed me to the abpAjaxForm method. This method can be used to make a regular form be posted via AJAX and, with that, have exceptions be handled with pretty popup messages and such.

ps: I also found a question from some years ago on the abp.io support forum requesting a method to show such messages on a form, but it also didn't mention the abpAjaxForm solution

Describe the solution you'd like

The only place I found mention of the methods needed for turning a regular form into an AJAX form was here. If possible, it would be appreciated if the data-ajaxForm="true" attribute could be mentioned on the ABP Form Tag Helpers documentation as a method of automatically handling exceptions within the existing JavaScript workflow.

Additional context

I'm unsure of the specific language that could be used on the tag helpers page to refer to the data-ajaxForm="true" attribute, but I believe that simply mentioning it there would make it significantly easier for people with the same need to figure this out in the future.

@matheusware
Copy link
Author

It appears there's already an issue related to this: #12262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant