How can I save data to the database for custom field?

Hi all,

I am new to ERPNext, I want to ask that how to customize form controls. I want to save data to the database, or save the path to the database. ie, geolocation, I want to upload an image from the pin. Here is the screenshot. The idea is, when clicks on choose file, there is a popup to choose which file wants to upload. then save the image to the folder, and the image path to the database. when a user opens this page, the image file path will load from the database, then shows up on the frontend.
So, how to save the image to the folder, and save the image path to the database? thanks a lot

Your doctype needs two fields:

  1. One of type “Attach Image”. This stores the file path.
  2. One of type “Image”. In the Options you have to write the name of the first field. This displays the image to the user.




thanks for your reply. I want to save the image, then display it on the marker, or clicks on the marker on the map, it has a popup shows the image, or something like that. I will check how the dataflow of the image. thanks