Is there a way to access the $_POST variable from within a plugin? I don't want to use the official forms plugin just for one simple task... I've tried $this->grav['uri']->post() because I saw it in the source code of the official plugin and an unknown function error. I also tried $this->grav['twig']->twig_vars['post'] = $_POST; and I get null!
Plugins
Solved by Ole Vik View solution
I usually just use $_POST in PHP and pass to Twig as needed. Is that not sufficient for your implementation?
Unfortunately the problem was in my request implementation 🙄
Thanks for taking the time to answer though.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 52 | 23 hours ago | ||
| 1 | 271 | 4 weeks ago | ||
| 2 | 430 | 2 months ago | ||
| 2 | 343 | 2 months ago | ||
| 3 | 1563 | 2 months ago |