How to identify which button submits a form - podcast episode cover

How to identify which button submits a form

Jul 18, 20224 minSeason 2Ep. 18
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

Which is the best way to know inside of an action function in Remix with which button a form was submitted

In this example the name is "action", but again I prefer to call this "intent": https://github.com/remix-run/remix/blob/d0d500849fbd87eace23bb3d479b7c556e314109/examples/multiple-forms/app/routes/invitations.tsx#L70-L75

How to identify which button submits a form

For the best experience, listen in Metacast app for iOS or Android