Hide script in html content or do shortcode
-
Hi,
i’ve made an API-call within a “HTML Content” field with your help:
<script> fbuilderjQuery(document).one('cff-gotopage', function(){ fbuilderjQuery.getJSON( 'https://api.metalpriceapi.com/v1/latest?api_key=[API_KEY]&base=USD¤cies=EUR,XAU,XAG', function(data){ fbuilderjQuery('[id*="fieldname3_"]').val(1/data['rates']['XAU']); ENABLEEQUATIONS(jQuery('[id*="cp_calculatedfieldsf_pform_"]')); EVALEQUATIONS(jQuery('[id*="cp_calculatedfieldsf_pform_"]')); }); }); </script>
My problem is that my API-KEY is visible in the browsers element inspector with the whole script.
Is there a method to HIDE this?A workaround could be to run this shortcode in a field: [metalpriceapi price_round=”2″]. Is that possible?
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Hide script in html content or do shortcode’ is closed to new replies.