Hi, I have added Javascript to marketing form to perform Hide and show fields based on the selected optionset . It is working fine when implemented inside normal HTML page . But the script is not working when the same form is hosted in dynamics 365 marketing and placed inside a webpage as a iframe. Can Anyone suggest the solution.
This is the script I want to execute.
Thanks!
<script>
$("#country").hide();
$("#province").hide();
$(document).ready(function(){
$('#480d3de0-b223-ed11-b83d-000d3ab987d9').on('change', function() {
if ( this.value == '0')
{
$("#country").show();
$("#province").hide();
}
else if(this.value=='1')
{
$("#country").hide();
$("#province").show();
}
else{
$("#country").hide();
$("#province").hide();
}
});
});
</script>