I need to insert into post a simple form handler, but WordPress’ engine deleted my code after saving. how can I fix it?
Leave a Reply
You must be logged in to post a comment.
I need to insert into post a simple form handler, but WordPress’ engine deleted my code after saving. how can I fix it?
You must be logged in to post a comment.
You cannot save raw PHP inside post content, it gets cleaned out on save. This is an obvious security precaution.
However, there are plugins that will enable you to do this, for example: http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/
This is not recommended though, better solution would be to create a generic shortcode for your from.
As an alternative to adding your PHP it may be easier to use a plugin like Contact Form 7 to create your form.