Skip to content

Modules and Fields

Ubaldo Porcheddu edited this page Jan 10, 2024 · 1 revision

In this section, we'll walk through the process of creating a new "Address Book" module in Tibula. Follow these steps to add modules and fields to the system.

Step 1: Navigate to Tibula/Structure/Modules

  1. Access Tibula and navigate to the "Structure" section.
  2. Choose "Modules" to view the list of existing modules.

Step 2: Create the Address Book Module

  1. In the Modules section, create a new module for the Address Book.
    • Set the name as "addressBook."
    • Assign a power value (e.g., 50).
    • Adjust the page results (e.g., 10).
    • Choose to generate an SQL table for this module.
    • Set "sortList" as needed.
    • Enable default permissions (save, copy, list, search, new, etc.).
    • Save the module.

Step 3: Add Fields to the Address Book Module

  1. Navigate to Tibula/Structure/Fields.

  2. Create new fields for the Address Book module:

    • Field: "name," Type: "text," Search Power: 1, Results: 1, Edit: 1.
    • Field: "surname," Type: "text," Search Power: 2, Results: 2, Edit: 2.
    • Field: "date_of_birth," Type: "date," Search, Results, and Edit: 3.
    • Field: "driving_license," Type: "boolean," Edit: 4 (leave other options unchecked).
    • Field: "address," Type: "textArea," Edit: Last position (e.g. 100).
  3. Save each field after creation.

Step 4: Translate Module and Field Names

  1. Go to Tibula/Administration/Translations.

  2. Translate the module name:

    • Module: "addressBook," Language: English, Name: "Address Book."
  3. Translate field names:

    • Field: "name," Module: "addressBook," Language: English, Name: "First Name."
    • Field: "surname," Module: "addressBook," Language: English, Name: "Last Name."
    • Field: "date_of_birth," Module: "addressBook," Language: English, Name: "Date Of Birth."
    • Field: "driving_license," Module: "addressBook," Language: English, Name: "Driving License."
    • Field: "address," Module: "addressBook," Language: English, Name: "Address."
  4. Save each translation.

Step 5: View and Use the Address Book

  1. Go back to Tibula and find the "addressBook" module.
  2. Explore the translated names and fields.

Step 6: Add Data to the Address Book

  1. In the "addressBook" module, click "New" and add entries, e.g., Donald Duck and Mickey Mouse.

  2. View the list to confirm the entries.

Congratulations! You have successfully created an Address Book module in Tibula with custom fields and translations.