How to send a URL query parameter through a hidden field in a form?

Hi Guys,

How to send a URL query parameter through a hidden field in a form?

I want to send two types of tracking codes in my forms with hidden field an it’ll be something like this:

url.com/contact?R=123456&CT=bs

In the form there will be two hidden fields, one for R and other for CT, and I want to receive this with my answers.

The form will send a Post request on my endpoint with all the answers and parameters query.

How do I achieve this?

@morf3u

Typically, POST type forms will not send the data using query parameters, for that you should configure it as GET type form.

So it’s a bit tricky, not sure, but I believe that the only solution is to catch the form submission using JavaScript, and then manually send the POST request to the URL with added parameters and the same body data.