Putting a form in a modal popup

A client has asked me to put a core form into a modal popup. I thought that seems like a simple request so i made a stack and put the form in that then call the stack in to a modal in my php.

But it fails to submit

Anyone else tried this with any success?

Are there JavaScript errors in the console?

It show a 404 on submit.

What version are you using? There was a v8 version where forms in global areas would throw 404 errors. Maybe that’s the issue?

Core Version - 8.5.4