Clickable image as default field value
-
Hi, I have a field in which I want to put a clickable image and, as every record has the same image, would like to set it as the default value for the field but, when I do that, various parts of the image link get escaped and am not sure how to resolve this.
If I manually enter the code into each record it works fine using the following…
<code><a title="Scroll to top" href="#scroll-top"><img class="alignnone size-full wp-image-725" src="https://www.cab.rogw.net/wp-content/uploads/2017/08/arrow-up.png" alt="" width="19" height="23" /></a></code>
However if I try and set it to a default value as a Rich Text field it becomes as follows with all the quotes escaped…
<code><a title=\"Scroll to top\" href=\"#scroll-top\"><img class=\"alignnone size-full wp-image-725\" src=\"https://www.cab.rogw.net/wp-content/uploads/2017/08/arrow-up.png\" alt=\"\" width=\"19\" height=\"23\" /></a></code>
Any ideas?
My thanksEdit: Just tried to resolve this a different way via phpmyadmin > change the field type to VARCHAR > set a default value for the field.
I’m not ace on MySQL and it failed but it may be the germ of an idea.The page I need help with: [log in to see the link]
- The topic ‘Clickable image as default field value’ is closed to new replies.