Hi,
I am trying to show checkbox fields on Elementor as either line break items or bullet points. I figured out the function to do it by throwing the code within an additional Elementor HTML widget. However the solution sucks because I can see the text shown as CSV first then converted to line break items. I was wondering what is the recommended practice for injecting ACF functions within Elementor.
This is the html code in injected into page template
<script>
window.onload = function(){
var list = document.getElementsByClassName('list-transform');
for(let i = 0; i < list.length; i++){
var listValues = list[i].innerText;
console.log(listValues);
list[i].innerText = '';
list[i].innerHTML += listValues.split(",").join("<br>");
}
}
</script>