tmarquespt Posted April 16, 2015 Share Posted April 16, 2015 Hello, I'm trying to get a combobox under category-Description field. I have used this code as an example (as it works) but when trying to save on prestashop it gives me an error: "Description field is invalid" It's translated from PT so it may not be accurate code I'm trying to use:<select onchange="window.location=this.options[this.selectedIndex].value"><option value="">Go to page...</option><option value="http://stackoverflow.com/">stackoverflow</option><option value="http://facebook.com/">facebook</option><option value="http://twitter.com/">twitter</option></select> I know the above code works as I tried it under Brackets but it might have some code not allowed by prestahop? What I'm trying to achieve (visually) is this: Any hints? thanks Tiago Link to comment Share on other sites More sharing options...
tmarquespt Posted April 18, 2015 Author Share Posted April 18, 2015 So I did found that the issue of not accepting the onchange was solved with this article from Milosz Myszczuk http://mypresta.eu/en/art/prestashop-16/extended-rich-text-editor.html however even if it accepts the code (and displays the combobox) when I select an option nothing happens. Is there anything in prestashop code that prevents this kind of script to work under category->description? can someone help me on this? Link to comment Share on other sites More sharing options...
tmarquespt Posted April 18, 2015 Author Share Posted April 18, 2015 so, after much messing around I did manage to do it disabling Preferences->General->HTMLPurifier. (saw this one on an unrelated subject by Vekia) Now I do have the combobox with links working under categories->description with the code from post #1 I also tried an iframe pointing to an x.html with the code inside but no luck with the links. Seems prestashop disables links under iframe (or at least I was missing something else). hope it helps someone else. Link to comment Share on other sites More sharing options...
CS-DE Posted July 13, 2016 Share Posted July 13, 2016 Hi, does your code contain JavaScript? I tried to add JavaScript, which simply shows an image, but I do still get the message "Description field is invalid". Link to comment Share on other sites More sharing options...
vekia Posted July 13, 2016 Share Posted July 13, 2016 Hi, does your code contain JavaScript? I tried to add JavaScript, which simply shows an image, but I do still get the message "Description field is invalid". you need to extend tinymce editor to make it work as you want. it's because by default description fields cant contain javascript codes. 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