- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 02:33 AM
Hello,
When creating a new KB Article and trying to add an image, this popup appears.
I would like to find the script which is called while clicking on the 'Save' button.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 05:23 AM
Hi
Technically, this is possible to implement.
Before proceeding with the technical solution, I would like to mention it that this will be a global change on the platform across the HTML fields and will require customization to OOB component.
Navigate to the module "UI Page' as shown below:
Search for the UI page name as "html_insert_image_dialog" as shown below:
Now in Client Script you need to add below lines of code after line number 134 as mentioned below:
var getAltText = gel('f_alt').value;
if(getAltText == ''){
alert('Please enter a alternate text');
return false;
}
Sharing a screenshot as well for reference:
Result:
Now when user tries to save the form without adding the Alt text then they will get an alert and will not allow to save the form as shown below:
This works for me in my PDI as you want.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 05:56 PM
That code is in the out-of-the-box UI page html_insert_image_dialog.
If you're trying to do something after the image is added instead of changing the behavior of the UI page, inserted images show up on the sys_attachment table as new records with a Table Name field value of "kb_knowledge". You could write a business rule on sys_attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 12:04 AM
Thx,
What I want to do is NOT to allow saving with an empty Alt Text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 05:23 AM
Hi
Technically, this is possible to implement.
Before proceeding with the technical solution, I would like to mention it that this will be a global change on the platform across the HTML fields and will require customization to OOB component.
Navigate to the module "UI Page' as shown below:
Search for the UI page name as "html_insert_image_dialog" as shown below:
Now in Client Script you need to add below lines of code after line number 134 as mentioned below:
var getAltText = gel('f_alt').value;
if(getAltText == ''){
alert('Please enter a alternate text');
return false;
}
Sharing a screenshot as well for reference:
Result:
Now when user tries to save the form without adding the Alt text then they will get an alert and will not allow to save the form as shown below:
This works for me in my PDI as you want.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke