Skip to main content

Adding Terms and Conditions to a DocType

You can add a Terms and Conditions section to any DocType by creating a custom Link field that references the Terms and Conditions master and a Text Editor field to automatically display the selected template’s content.

1. Open Customize Form

  1. Navigate to the DocType where you want to add Terms and Conditions (for example, Driver).
  2. From the document list, click Menu > Customize.

2. Choose the Position for the New Fields

  1. In the list of fields, locate the section after which you want to insert the Terms and Conditions.
  2. Expand the field by clicking its configuration icon.
  3. Click Insert Above or Insert Below to create a new field.

3. Create the Terms Template Field

Create a new field with the following configuration:

  • Label: Terms and Conditions
  • Field Type: Link
  • Options: Terms and Conditions

This field allows users to select an existing Terms and Conditions template from the master record.

4. Create the Content Field

Add another field directly below the Link field with the following configuration:

  • Field Type: Text Editor
  • Fetch From: terms_and_conditions.terms

The Fetch From property follows the format:

link_field_name.field_to_fetch

Where:

  • terms_and_conditions is the fieldname of the Link field.
  • terms is the field in the Terms and Conditions DocType that stores the template content.

5. Save the Customization

  1. Click Update to save the changes.
  2. Return to the document list.
  3. Reload the page using Ctrl + Shift + R so the new fields become available.

6. Using the Terms and Conditions Field

When creating or editing a document, select a Terms and Conditions template from the Link field.

ERPNext automatically retrieves the content from the selected template and displays it in the Text Editor field using the Fetch From configuration.

7. Benefits

  • Reuses standardized Terms and Conditions templates across documents.
  • Eliminates manual copying and pasting of legal text.
  • Ensures consistency across business documents.
  • Automatically fetches the latest template content.
  • Can be added to any standard or custom DocType.
Rating: 0 / 5 (0 votes)