Add a custom field to a form ​

Every form has a standard set of fields. When you need to record something that has no standard field, add a custom field. For example, add a Vendor Code to the Supplier form, or a Project link to the Item form.

Prerequisites ​

  • The System Manager role.

Add the field in Customize Form ​

  1. Open Customize Form for the DocType.
  2. In the form builder, find the place for the new field, and add a field there.
  3. Enter the Label, for example Vendor Code.
  4. Select the field type, for example Data. Read the field types reference.
  5. Set other properties if needed, such as Options for a Select or Link field. Read the field properties reference.
  6. Select Update.

Add the field from the Custom Field list ​

  1. Open the Custom Field list, and select New.
  2. In DocType, select the form, for example Supplier.
  3. Enter the Label, and select the field type.
  4. In Insert After, select the field that the new field follows.
  5. Set other properties if needed.
  6. Select Save.

Field names of custom fields ​

ERPNext makes the field name from the label, and adds the prefix custom_. For example, the label "Vendor Code" gives the field name custom_vendor_code. The prefix prevents a clash with standard fields that ERPNext may add later.

To change the field name, open the field in the Custom Field list, and select Rename Fieldname.

WARNING

Scripts, print formats, and reports use the field name. Change it before you use the field anywhere.