How to pass input field to form redirect?

I am trying to make a small Whatsapp popup to let the client send a message to the website owner. I would like the message of the client to be filled in when redirecting. This is done via a query parameter when calling the Whatsapp URL.
My question is: How can I pass the text variable of the user? I have already tried to set the message ID of the form into brackets, but that does not seem to work.