ursnygg Posted October 7, 2014 Share Posted October 7, 2014 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 More sharing options...
vekia Posted October 7, 2014 Share Posted October 7, 2014 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 Link to comment Share on other sites More sharing options...
ursnygg Posted October 7, 2014 Author Share Posted October 7, 2014 Thank you! WIll try this! Link to comment Share on other sites More sharing options...
ursnygg Posted October 7, 2014 Author Share Posted October 7, 2014 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 More sharing options...
ursnygg Posted October 7, 2014 Author Share Posted October 7, 2014 Neither can I see any difference in my cms editor after changing the tinymce..? Link to comment Share on other sites More sharing options...
ursnygg Posted October 7, 2014 Author Share Posted October 7, 2014 Got it to work! Thanks! Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2014 Share Posted October 8, 2014 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 More sharing options...
ursnygg Posted October 8, 2014 Author Share Posted October 8, 2014 Yes, the modification was wrong but now its all working fine and the form is in place. Thank you for your quick help! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now