Support

Account

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>