question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🚀 Feature request

Current Behavior

People do hack with setTimeout + setFieldValue - #214

Desired Behavior

It would be great if we have an option to pass something with submitForm(payload) to submit handler or get an event from submitted button.

Who does this impact? Who is this for?

For all people who need to render two submit buttons with different submitting logic!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:15
  • Comments:11

github_iconTop GitHub Comments

5reactions
florentdestremaucommented, Nov 25, 2019

So all you’re asking for is the submit event during onSubmit?

YES ! I have exactly this problem right now. I want a “save as draft” and a “save & publish” button, very easy to handle, I would simply like to add a query parameter to the post URL, but I have been looking for any clean solution for the last 2 hours and can’t find any… Having an event helping me to find out what is the name of the submit button used would solve the case.

3reactions
johnromcommented, Sep 7, 2019

So all you’re asking for is the submit event during onSubmit? I don’t have anything against that, necessarily, but I’m not the one to make the final for API changes. I’d recommend modifying this issue from “Submit Payload” to something like “Pass Submit Event to onSubmit Handler” to help future maintainers understand what is being asked for!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending form data - Learn web development | MDN
As we'd alluded to above, sending form data is easy, but securing an application can be tricky. Just remember that a front-end developer...
Read more >
REST Payload - How to Push to Web API - Dotcom-Monitor
Learn how to easily submit a request to the REST web API or push payloads with the Dotcom-Monitor platform.
Read more >
How do I send JSON Payload to the server? - ReqBin
In this JSON Payload Example, we send JSON to the ReqBin echo URL. Click Send to execute the JSON Payload request online and...
Read more >
How to send payload as a multipart/form File in a HTTP Request
How to send your payload as a File using multipart/form in your HTTP request.
Read more >
Reference: View interaction payloads - Slack API
The full list of fields that form view_submission and view_closed events, received when modals are submitted or closed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found