Home › Forums › General Issues › Call ACF field value inside Javascript script › Reply To: Call ACF field value inside Javascript script
<div id="adobe-dc-view" style="height: 800px; width: 800px;"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "<CLIENT ID>", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "<?php the_field('dokumente_datei'); ?>"}},
metaData:{fileName: "<?php the_title(); ?>"}
}, {embedMode: "SIZED_CONTAINER"});
});
</script>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.