How can I create a new DocType from scratch

Hello ,
i need to try making custom doctypes and its form from scratch ?
how can i add custom fields and custom HTML inside doctype form ?
how do these fields related to DataBase?
if i made a custom html input type inside doctype form, how does its value be inserted in DB ?
… etc
things like that :drooling_face :drooling_face:

I recommend you go through this tutorial entirely :

Ensure that you have developer mode enabled, and always make your doctypes belong to your own app’s modules so that the erpnext repo stays untouched.

Now to answer your questions :

I’m not sure about custom HTML but you can various types of fields in a doctype. You can rearrange them, organize your doctype into sections. You can always add, remove fields and change their properties too.

Every doctype is related to the same name table in the database. Hence all fields (except the layout fields like Column break/section break/buttons) are columns in that table.

If I’m not wrong, I think you are trying to add your own fieldtype to Frappe (which I have no idea about ). You should find your requirements being fulfilled by the existing fieldtypes. Please go through that tutorial.

thank you @root13F

1 Like