We have a registration service that opens up its values of participation and donation through a piece of JS script. Is there any way to sue that as a value in the counter? The JS is simple a document.write containing the value.
Hi @501creative,
Thanks for reaching out.
It is not very clear how you will get that number. For now, you can add the number or value to the counter through the Dynamic Content tag. So you can create a custom dynamic content tag and fetch the data as you are trying to.
To create a custom dynamic content tag, please go through the following thread.
Hope it helps.
Thanks
Thanks for the response. They are returning the values to use via a link to an javascript snippet:
https://theirsite.net/racephotos/PTC/Fundraising_Total.js
So can I use something like that for the value?
add_filter( ‘cs_dynamic_content_fundraise’, function( $result, $field, $args) {
// {{dc:stuff:fundraise}}
$result = ‘https://theirsite.net/racephotos/PTC/Fundraising_Total.js’;
return $result;
}, 10, 3 );
Hi @501creative,
It is not very clear what the JS is returning, but you need to include it through the script tag. Using it in the PHP code is not possible.
Thanks
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.