Skip to content

How to pass data object along with the new resetForm json response #425

Answered by edmundhung
taylrd asked this question in Q&A
Discussion options

You must be logged in to vote

When you set the resetForm option, Conform will only includes the minimal data needed for the form reset and avoid sending data that's unnecessary. If you wanna include additional info, you can include them manually in the action response:

return json({
  result: submission.reply({ resetForm: true }),
  submittedValue: submission.value, 
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by taylrd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants