Jump to content

Custom form field in CMS page


Recommended Posts

Hi,

 

I have created a custom made form field that should be used in a CMS page for retailers that wants to sell our products. However, when pasting this code into the code field in the cms page I get the message "The content field is invalid"

 

I am running prestashop 1.6.0.9 and I have activated allow frames and disabled HTML purifier under general settings.

 

Here is the code for the field that I am trying to use:

 

<iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="http://form.jotformeu.com/form/42793594949375" frameborder="0" style="width:100%; height:1723px; border:none;" scrolling="no"></iframe>
<script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;[spam-filter];if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>
 
 
All help appreciated!
Link to comment
Share on other sites

default validation process of html fields (cms body uses isHtml validate function) doesnt accept scripts

your code uses script.

you have to extend tinymce editor

 

I am getting a error when trying to access my page after this procedure:

 

Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting ';' or '{' in /storage/content/21/2000021/jamesbarts.com/public_html/classes/Validate.php on line 396

Link to comment
Share on other sites

I am getting a error when trying to access my page after this procedure:

 

Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting ';' or '{' in /storage/content/21/2000021/jamesbarts.com/public_html/classes/Validate.php on line 396

 

modification of validate was wrong probably, make sure that you followed instructions carefully

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...