Skip to main content
2 of 2
Added the correct solution
obiPlabon
  • 1.7k
  • 7
  • 13

Updated

Actually, you have to trigger change event to activate the Save button. WordPress widget handler listens to only changes. When you update the input field value with JS, DOM doesn't trigger any change. That's why we have to trigger manually. Please check the following code -

$('.deo-' + type + '-hidden-input').val(attachment.url).trigger('change');
obiPlabon
  • 1.7k
  • 7
  • 13