php - Use URL parameter in Contact Form 7 Field

I would like to add some PHP in my form created with Contact Form 7, a WordPress plugin. I've already tried this but it didn't work: Executing PHP Code in Contact Form 7 Textarea. Every time I insert the function, my website crashes.
I have a variable stored in a $_SESSION. I have put that variable in a hidden input and now I would like to take the value of the hidden input and place it in the contact form. How can I do this? Thanks!
Answer
Solution:
I think this approach can work for you.
- Set a url param to the link. Example
domain.com/more-info?previous-link=home-page
In your form add this field
[text* previous-link default:get default:post_meta "Previous link"]
You can see more examples in the docs
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: mysqli::real_connect(): (hy000/2002): connection refused
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.