[SOLVED] Adding a form code to page

Post Reply
autodefrost
Premium User
Posts: 9
Joined: Sun Feb 16, 2014 7:06 pm

[SOLVED] Adding a form code to page

Post by autodefrost »

I have my page all setup, and I'd like to add the code for my form on the 'contact' page.
I'm using MachForms, and when there code is added, the page ignores the code... by not saving it when added.

I have 2 options of code to add:

1. An Iframe:
Anyone have any luck adding an Iframe to WonderCMS (example Google Maps)

2. PHP Snippet: It is basically ignored....

Code: Select all

<?php
	require("/home2/ramble/public_html/form/machform.php");
	$mf_param['form_id'] = 1;
	$mf_param['base_path'] = 'http://198.57.247.205/~ramble/form/';
	display_machform($mf_param);
?>
Thanks in advance :D
wiz
Admin
Posts: 481
Joined: Sat Oct 30, 2010 12:23 am

Re: Adding a form code to page

Post by wiz »

While executing PHP isn't supported, you can insert an iframe.
In version 0.4.1 (and prior versions), you have to specify the HTML tags you want to allow.

In version 0.4.1 open up editText.php and the line you're looking for is:

Code: Select all

$content = strip_tags($content,"<audio><source><embed><p><h1><h2><h3><h4><h5><h6><a><img><u><i><em><strong><b><strike><center><pre>");
By adding the tag(s) you need (in this case I think <iframe> should just do the trick) you'll enable your editable content areas to work with the new tag.

So your new code would look like:

Code: Select all

$content = strip_tags($content,"<iframe><audio><source><embed><p><h1><h2><h3><h4><h5><h6><a><img><u><i><em><strong><b><strike><center><pre>");
NOTE:
All HTML tags work by default on the new 0.5.1 BETA (that can be found here).
Here's an example of how the 0.5.1 BETA works with iframes (you can login the password admin (as this is a demo)).
autodefrost
Premium User
Posts: 9
Joined: Sun Feb 16, 2014 7:06 pm

Re: Adding a form code to page

Post by autodefrost »

Worked, like a charm! Thank you!
wiz
Admin
Posts: 481
Joined: Sat Oct 30, 2010 12:23 am

Re: Adding a form code to page

Post by wiz »

I'm very glad and you're welcome.

Marking this topic as solved.
Post Reply