How have you set up the custom field, which holds the code you’re trying to embed?
Thread Starter
ruauu2
(@ruauu2)
At the bottom of the page in the page editor is a heading called Custom Fields. When expanded there are two fields: Name, in which I entered %CODE%; and Value, in which I entered
<div class=”AW-Form-580850878″></div>
<script type=”text/javascript”>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//forms.aweber.com/form/78/580850878.js”;
fjs.parentNode.insertBefore(js, fjs);
}(document, “script”, “aweber-wjs-jxor0th8l”));
</script>
Is that what you meant by “…set up the custom field?”
Ah, that’s the problem, then – you only need to add the % bits when adding it to your post content. So, change the custom field to be named CODE1 and not %CODE1%.
Thread Starter
ruauu2
(@ruauu2)
Needing the % bits only in the post content makes perfect sense. I have corrected that.
The error message is gone, but the form still does not display. The desired code does appear in the source of the page so I suspect it’s out of your hands now. Is that correct?
(I have submitted a support ticket to the entity that provided the code.)
Thank you for your help, David!
You are correct, yes – if the script is appearing in your source as you’d expect then the issue is with that. Good luck with and let me know how you get on.
Thread Starter
ruauu2
(@ruauu2)
A Firefox extension was blocking the JS. I will be changing the code from JS to HTML to avoid such blocking. Thanks again for your help.