Replies: 1 comment 1 reply
-
Hi @tomhrtly, This actually already exists in Inertia to some extent, using the Here's a basic Vue example of what this could looks like. In this situation, I'm excluding the this.form = this.$inertia.form({
user: this.user
})
.transform(({ user, ...data }) => ({
user_id: user?.id,
...data,
}))
// Somewhere else at a later point..
this.form.post(`/example') Let me know if this solves your problem! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment, to integrate reCAPTCHA v3 with the Inertia form helper, you have to add the reCAPTCHA code to every form in your application like so:
It would be great to be able to add this only once for all forms so that there is no reCAPTCHA duplication. Maybe something like this would work in
app.js
:It might be handy to have the events in the form helper to be used as "hooks" as well, mainly because if a Promise is executed in the
onBefore
which adds another property to the form (in this case the reCAPTCHA token), the form is submitted before the Promise has been resolved.@reinink I'd be willing to submit a PR for this if an agreement was made on implementation.
Beta Was this translation helpful? Give feedback.
All reactions