In my D365 form, I have some fields that contains HTML tags. like link.
When I show this form into the portal I can see the tag. which is not expecting.
i use the following javascript
$(document).ready(function(){
// Set the value into tem variable
var std_footer_presave = $('#std_footer').val();
//Remove HTML tag
$("#std_footer").parent().append("<span class='text'>" + $("#std_footer").val()+ "</span>");
$("#std_footer").remove();
// Form validation for next button or save button
window.webFormClientValidate = function () {
// Create hidden field
$('#std_footer').val('');
$('#std_footer').hide();
$('<input>', {
type: 'hidden',
id: 'std_footer',
name: 'std_footer',
value: ''
}).appendTo('form');
// Set value into hidden field
$('#std_footer').val(std_footer_presave);
return true;
};
});
Comments
Post a Comment