So I am coming from WordPress and typically I would typically handle a post by either hooking into the wp_post action and access the $_POST request that way. Now I believe Craft is built on Yii which is an MVC framework but I cannot find any documentation showing how to handle post requests?

Any help or can you point me in the right direction?

1 Answer 1


Doing it through a plugin would be the easiest way.


Your plugin would have a controller that the form would post to, then you'd grab the data from POST and do whatever you want with it.

A good example of this you can look at is the Guest Entries plugin, that allows "anonymous" front-end entry submissions.

  • Thanks for the reply. I was thinking about this last night and I also came to the conclusion that a plugin may be the best way to handle this. I will give it a go!
    – Radmation
    Sep 19, 2018 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.