How to add Address and Contact HTML section

Hi there.

I want to add the Address and Contact section to my Custom DocType.

I have created all the fields in DocType and I want to know which py code need to add into the server side to get the datas.

Please let me know how to do this.

I have added the import code to the .py file but the rest is missing.

1 Like

i need this too

frappe.db.get_value(‘doctype’, {filters}, [fields])

should i add this in doctype.js file ?

Yes you can add it into js or py controller depends on your logic

i can added in js file
but please i want more completed code
my doctype name in workers
and i use default erpnext contacts and address doctyps

“but please i want more completed code”

Why not search for gems to learn from -

In this forum check for say frappe.db.get_value or frappe.db.set_value

Use frappe.db.get_value within a Depends On doesn't work
Getting company_name from another doctype - #9 by eldorim
How to add TAX ID in Sales Invoice Print Out

or the actual code base, either from a console for either Python controller

frappe@ubuntu:~/frappe-bench$ find . -name *.py | xargs grep frappe.db.get_value

or Javascript form views

frappe@ubuntu:~/frappe-bench$ find . -name *.js | xargs grep frappe.db.get_value

also too the github repository:

hope this helps

1 Like

that’s it
i’ve tried for last 4 hours and i couldn’t did it :confused:
maybe if some one could help me i appreciate your help

“that’s it
i’ve tried for last 4 hours and i couldn’t did it :confused:
maybe if some one could help me i appreciate your help”

What specifically are you referring to?

thank you for your replay
my company have a workers listing website
so i created a new doctype it’s name workers ( it is the same customer doctype with all it’s fields) this doctype under custom module called workers under custom app called listing
all i want to display address like this in worker doctype


ps. iam in production mode

“all i want to display address like this in worker doctype”

Why don’t you and garybsimon collaborate here…

@garybsimon
i’ll be glade if we worked together on this if you agree

1 Like

@garybsimon , @fatheyabdelslam is it done? please explain as i want to do this also.