Is there any way to embed html form or php code in forum post?
I want to embed a simple HTML form into a post marked as "Announcement". Then users will be available to fill this form directly from the forum post related.
I will code myself the HTML form to do the appropiate actions (like send an email with the information), but my question is how can I embed this HTML form into a certain post? Or better yet: how can I embed PHP code on certain post of a vanilla forum?
Is there any easy way to do this? (I think the editor doesn't allow to embed PHP code when editing posts as Administrator)
Thanks!
Best Answers
-
x00 MVP
generally you would want to restrict it. However there is a way yes.
create AllowRawFormat folder and class.allowrawformat.plugin.php file inside an place that content. You can then enable it.
Give yourself the
Plugins.AllowRawFormat.Allow
permission. Post it. You may want to revoke this after as the HtmLawed formated, tend to remove crap you don't need and the is usefulgrep is your friend.
5 -
whu606 MVP
You might want to take a look at this plugin:
http://vanillaforums.org/addon/contact-plugin
to help you with the coding.
7
Answers
generally you would want to restrict it. However there is a way yes.
https://github.com/vanillaforums/Addons/blob/master/plugins/AllowRawFormat/class.allowrawformat.plugin.php
create AllowRawFormat folder and class.allowrawformat.plugin.php file inside an place that content. You can then enable it.
Give yourself the
Plugins.AllowRawFormat.Allow
permission. Post it. You may want to revoke this after as the HtmLawed formated, tend to remove crap you don't need and the is usefulgrep is your friend.
@jvil
You might want to take a look at this plugin:
http://vanillaforums.org/addon/contact-plugin
to help you with the coding.
Thanks! This is what I was looking for.