Merge data on form submission #2194
agustinzamar
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@agustinzamar You would probably want to use the `transform() method on the form helper to add the status field instead. |
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
-
Consider you have a page to create a new post. You have 2 buttons: "Create draft" and "Publish". Based on which button is pressed you need to submit the form with the post data but one field "status" must be different.
On the handleSubmit function you could do
and
status
would be appended to the request payload when submitted. Currently this is ommited and only the data present on the form is submittedBeta Was this translation helpful? Give feedback.
All reactions