Skip to content

Submit forms with fetch#136

Closed
BobWez98 wants to merge 3 commits intomasterfrom
feature/forms-ajax
Closed

Submit forms with fetch#136
BobWez98 wants to merge 3 commits intomasterfrom
feature/forms-ajax

Conversation

@BobWez98
Copy link
Copy Markdown
Member

@BobWez98 BobWez98 commented May 2, 2025

This adds a version with the translations being passed as prop. I will make a second PR whith a proposal for merging translations with Rapidez Core.

Also see #137 for a better handling of translations

@BobWez98 BobWez98 requested review from kevinmeijer97 and royduin May 2, 2025 08:20
type: Object,
default: () => ({}),
},
callback: {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a callback because in a project you might want to add some functionality like "closing a modal" or conversion tracking.

return {
formData: this.initialData,
success: false,
error: false,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The developer can use these to show/hide validation on the frontend apart from the notify.

@BobWez98 BobWez98 changed the title Submit forms with ajax Submit forms with fetch May 2, 2025
@BobWez98 BobWez98 requested a review from Jade-GG May 2, 2025 10:56
@Jade-GG
Copy link
Copy Markdown
Collaborator

Jade-GG commented May 2, 2025

I agree that #137 is nicer when the translations thing is merged 🙂

}
} else {
this.error = true
Notify(this.translations.error, 'error')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BobWez98
Copy link
Copy Markdown
Member Author

As discussed this will be closed.

@BobWez98 BobWez98 closed this May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants