ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Show Image after Save of Attached Image


#1

I have a field of type attached image. By default its showing the attached image’s filename. What I want to achieve is on save, I want to show that image there not the file name. Any suggestions/help will be appreciable.

Thank You


#2

There is one another datatype i.e attach, which shows image after attaching image


#3

yup but problem with that is , to attach data there, you first need to save the file and anyone remove it untill it is in save state.

Any way to overwrite these two things in attach type ?


#4

For that you need to make changes on attachment.js


#5

I´d recommend creating a html field to show the image an then, on the form´s validate event, populate that field with the image´s route so you can visualize (and manipulate) as needed.

Good Luck!


#6

An if-else statement with refresh field worked for me. Thanks BTW :slight_smile: