<p>The difference between a plugin and 3 files in WordPress is that a plugin encapsulates the behavior in a defined way. This is an improvement over just writing random PHP scripts, even if there is more formality to it.</p>
<p>You could do it via a custom module (which would be part of your site) with just one <a href="https://www.yiiframework.com/doc/guide/2.0/en/structure-controllers" rel="nofollow noreferrer">controller</a> (analogous to your PHP file in WordPress). See the article <a href="https://nystudio107.com/blog/enhancing-a-craft-cms-3-website-with-a-custom-module" rel="nofollow noreferrer">Enhancing a Craft CMS 3 Website with a Custom Module</a></p>
<p>You could also use the pre-fab <a href="https://plugins.craftcms.com/contact-form" rel="nofollow noreferrer">Contact Form plugin</a> from Pixel &amp; Tonic.</p>
<p>And finally, you could use GraphQL to do it without any plugins/module, or writing any custom PHP. See <a href="https://nystudio107.com/blog/using-vuejs-graphql-to-make-practical-magic#graph-ql-for-con-tact-form-sub-mis-sion-sav-ing" rel="nofollow noreferrer">GraphQL for Contact Form Submissions</a></p>

CC BY-SA 4.0
2021-10-04T01:03:09.503Z
Amazing. Thank you for sharing all this resources.
mauricio
CC BY-SA 4.0
2021-10-04T00:40:39.063Z
2021-10-04T00:40:39.063Z
andrew.welch
<p>I'm coming from Wordpress and really enjoying craft. I wonder though if it is possible to create a contact form without any plugins? And if so, how easy/worthy of an effort is is? In WP I would create a form, with an action targeting a php file. This php file would do all the form processing, and output a confirmation message. The whole thing would involve 3 files at most (the form template file, the php form processing script, and some js file).</p>
<p>Thanks for your feedback.</p>

<contains>
Hand tailored contact form -no pluggins
# Hand tailored contact form -no pluggins

(Asked by: username_0 on 2021-10-03)

I'm coming from Wordpress and really enjoying craft. I wonder though if it is possible to create a contact form without any plugins? And if so, how easy/worthy of an effort is is? In WP I would create a form, with an action targeting a php file. This php file would do all the form processing, and output a confirmation message. The whole thing would involve 3 files at most (the form template file, the php form processing script, and some js file).

Thanks for your feedback.

**Tags:** contains

---

## 1 answers

### Answer by username_1 on 2021-10-04. Score: 1 | Accepted answer

The difference between a plugin and 3 files in WordPress is that a plugin encapsulates the behavior in a defined way. This is an improvement over just writing random PHP scripts, even if there is more formality to it.

You could do it via a custom module (which would be part of your site) with just one [controller](https://www.yiiframework.com/doc/guide/2.0/en/structure-controllers) (analogous to your PHP file in WordPress). See the article [Enhancing a Craft CMS 3 Website with a Custom Module](https://nystudio107.com/blog/enhancing-a-craft-cms-3-website-with-a-custom-module)

You could also use the pre-fab [Contact Form plugin](https://plugins.craftcms.com/contact-form) from Pixel & Tonic.

And finally, you could use GraphQL to do it without any plugins/module, or writing any custom PHP. See [GraphQL for Contact Form Submissions](https://nystudio107.com/blog/using-vuejs-graphql-to-make-practical-magic#graph-ql-for-con-tact-form-sub-mis-sion-sav-ing)

> **Comments:**
> **username_0**: Amazing. Thank you for sharing all this resources.  

---

