thejewster Posted January 29, 2014 Share Posted January 29, 2014 HiI am trying to insert some HTML into the category description part of a page. This is a form from allforms.This is the HTML <div align="center"><form name="afm_form_f84b60ce" id="afm_form_f84b60ce" action="http://plus.allforms.mailjol.net/u/f84b60ce.php" method="POST" style="margin: 0px"><table border="0" cellpadding="6" cellspacing="0" style="text-align: left; border: 4px solid #7090B0; border-collapse: collapse" width="1%" bgcolor="#F0F0F0"><tr><td colspan="2" bgcolor="#7090B0" style="font-size: 14px; font-family: Verdana; color: #FFFFFF; font-weight: bold; padding: 4px">Alternatorsnstarters - Quick Quote</td></tr><tr><td colspan="2" style="padding: 8px; font-size:11px; font-family: Verdana; color: #000000">Questions marked by * are required.</td></tr><tr><td width="1%" style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">1.</td><td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold; padding-right: 20px; color: #000000">Email: *<br><input type="Text" name="Email:" size="49" style="font-size: 11px; font-family: Verdana"></td></tr><tr><td width="1%" style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">2.</td><td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold; padding-right: 20px; color: #000000">Registration No *<br><input type="Text" name="Registration No" size="49" style="font-size: 11px; font-family: Verdana"></td></tr><tr><td width="1%" style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">3.</td><td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold; padding-right: 20px; color: #000000">Delivery Address<br><textarea rows="4" cols="49" style="font-size: 11px; font-family: Verdana" name="Delivery Address"></textarea></td></tr><tr><td width="1%" style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">4.</td><td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold; padding-right: 20px; color: #000000">Part Required *<br><select style="font-family: Verdana; font-size: 11px" size="1" name="Part Required"><option value="" selected>-</option><option>Alternator</option><option>Starter Motor</option><option>Air Con Compressor</option><option>Regulator</option><option>Solenoid</option></select></td></tr><tr><td width="1%" style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">5.</td><td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold; padding-right: 20px; color: #000000">Part Number if Known<br><input type="Text" name="Part Number if Known" size="49" style="font-size: 11px; font-family: Verdana"></td></tr><tr><td colspan="2" align="center" style="padding: 8px"><input type="submit" name="submit" value="Submit" style="font-size: 11px; font-family: Verdana"> <input type="reset" name="reset" value="Reset" style="font-size: 11px; font-family: Verdana"></td></tr></table></form></div> I get this error Property Category->description is not valid Does anyone know how to fix this. Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 it's because <form> and <input> aren't accepted in validation isCleanHtml function. you have to modify this function, otherwise your code will not work anymore. Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 (edited) How can I modify it. All i want is this form integrating into my website. Edited January 29, 2014 by thejewster (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 what ps version you use? everything depends on it. Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 PS 1.5.6.2 Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 open validate.php class (classes/validate.php) there is a code like: public static function isCleanHtml($html, $allow_iframe = false){ return true; } Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 and what do I do with this code. I have found it. How should I amend it Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 nonooo something removed my code :| instead of original isCleanHtml function, use this: public static function isCleanHtml($html, $allow_iframe = false){ return true; } Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 I just swapped it and now I cant access my shop at all on local host Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 it mean that you changed something wrong. can you show full contents of validate class please? (due to the fact that this file is "big" - you can attach it somewhere, for example to pastebin.org) Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 (edited) I have pasted it in pastebin under the name (thejewster) and in public Edited January 29, 2014 by thejewster (see edit history) Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 (edited) currently in pastebin (thejewster) Edited January 29, 2014 by thejewster (see edit history) Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 figured it out. it will be on pastebin in 2 mins Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 its in public as thejewster in pastebin Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 so... it's fixed or you uploaded it to pastebin? if so, can you share url ? i don't know it Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 http://pastebin.com/raw.php?i=T8R4Lbrg Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 this is your function: public static function isCleanHtml($html, $allow_iframe = false){ return true;} { $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange'; $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend'; $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove'; $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel'; $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart'; $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange'; $events .= '|onselectstart|onstart|onstop'; if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) return false; if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) return false; return true; } it's wrong. use only this: public static function isCleanHtml($html, $allow_iframe = false){ return true; } Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 Its up and running. Just one last thing my friend. The form is there but it only shows half of it and there is a link underneath that says (more) and you have to press this to view the entire form.Do you know how to get rid of this so when the page loads the entire form is viewable Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 i have no idea about what "more" link you're talking. is there any chance to see it live? Link to comment Share on other sites More sharing options...
thejewster Posted January 29, 2014 Author Share Posted January 29, 2014 (edited) Please see attached Edited January 30, 2014 by thejewster (see edit history) Link to comment Share on other sites More sharing options...
SHIROKO Posted January 30, 2014 Share Posted January 30, 2014 (edited) I think his text is wrapped and has a + more and - hide on his form to show text. Edited January 30, 2014 by SHIROKO (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 30, 2014 Share Posted January 30, 2014 any chance to see it live? if so, please share url (if you already shared it, sorry i don't remember ) Link to comment Share on other sites More sharing options...
thejewster Posted January 30, 2014 Author Share Posted January 30, 2014 its on localhost. it wont let me put a pic on here Link to comment Share on other sites More sharing options...
vekia Posted January 30, 2014 Share Posted January 30, 2014 and are you able to upload it to imgur.com and post link here? Link to comment Share on other sites More sharing options...
thejewster Posted January 30, 2014 Author Share Posted January 30, 2014 (edited) yes this is the url Do you also know how to take out (There are no products in this category) http://imgur.com/kfqXzHW By the way you are a star Edited January 30, 2014 by thejewster (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts