Appending form action url to the current url

Keywords: html forms


I want to send the form data to the current URL + a relative path. For example, I have the form on the url https://domain/path/:id and I want to send the form data to https://domain/path/:id/form-action.

I don't want to use any javascript for this.

I have tried messing around with the action property of the form. For example, I tried using action=#/there. It almost worked, but I got an extra # in the URL I couldn't get rid of

<form action="#/there" method="post">
    <input type="submit" value="enter">

I want to get the same URL with an extra path. I can't do it hardcoded because the URL is dynamic.