germsvel / phoenix_test

MIT License
144 stars 20 forks source link

support form with `?` as action #72

Open mayel opened 4 months ago

mayel commented 4 months ago

Having a form with action="?" should submit to the current path but instead leads to a 404: no route found for POST /

mayel commented 4 months ago

same with action="#"

germsvel commented 4 months ago

Yeah, those are interesting. I think those forms of submitting forms to the current path are left over from before the HTML standard made <form> not require an action.

But I think we should support that (PhoenixTest itself requires an action, since that's probably what people want). I'd love a PR if you're up for it. Otherwise, I'll try to get that when I can.