destack icon indicating copy to clipboard operation
destack copied to clipboard

How to submit form?

Open apugoneappu opened this issue 4 years ago • 1 comments

Hey there,

Amazing project, thanks for all the great work!

Just wanted to ask how to submit the form? I am running the destack starter repo locally.

I have

  • added a component with a form
  • made a file pages/api/submit.js
  • selected the form and changed the component settings to:
    • Method: POST
    • Action: /api/submit
    • Async: ON (checked)
  • selected the Button and set it to SUBMIT.

apugoneappu avatar Dec 30 '21 11:12 apugoneappu

Hi @apugoneappu,

Glad you liked Destack. Through your issue I realised I missed a bit of config in pages/api/submit.js

To get the form submission to work head back to pages/api/submit.js to find the corrected api route.

LiveDuo avatar Jan 02 '22 17:01 LiveDuo