Skip to content

Commit f2ea73c

Browse files
Merge pull request #69 from OpenSPP/various-fixes-in-docs-edwin
Arrange user guide->administration docs and created new custom fields guide
2 parents 13351c3 + f4a5fde commit f2ea73c

39 files changed

+110
-25
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
review-status: needs-review
3+
review-date: 2025-08-29
4+
reviewer: migration-script
5+
migration-notes: "Added during 2025 documentation reorganization"
6+
---
7+
8+
# Custom Fields
9+
10+
Custom fields are a powerful feature in OpenSPP that allow administrators to add new data fields to registrant profiles without requiring developer intervention. They can be used to capture additional information that is specific to a program's needs, such as a secondary contact number, a disability status, or any other piece of data not included in the standard OpenSPP setup.
11+
12+
This guide provides step-by-step instructions on how to create a simple custom field using the **Custom Fields UI**. We will create a field to store a "Secondary Phone Number" for an individual.
13+
14+
```{note}
15+
The Custom Fields UI is designed for creating straightforward, user-defined fields for direct data entry. For fields that require automatic calculation or complex logic, see the {doc}`indicator_fields` guide.
16+
```
17+
18+
## Prerequisites
19+
20+
To create and manage custom fields, you need:
21+
- A user account with the **System Admin** role. For more details, see the {doc}`user_access` guide.
22+
- The **OpenSPP Custom Fields** (`spp_custom_field`) and **OpenSPP Custom Fields UI** (`spp_custom_fields_ui`) modules must be installed and activated in your OpenSPP instance.
23+
24+
## Objective
25+
26+
After completing this tutorial, you will understand how to create, configure, and verify a custom field in OpenSPP.
27+
28+
## Process
29+
30+
The process involves navigating to the Custom Fields menu, defining the properties of the new field, and verifying its presence on the individual records.
31+
32+
### Navigate to Custom Fields
33+
34+
First, access the Custom Fields management interface.
35+
1. Click on the menu icon in the top-left corner and select **Registry**.
36+
2. In **Registry**, click the **Configuration** menu.
37+
3. Click on the **Custom Fields** sub-menu.
38+
39+
![](custom_fields/step01_configuration_custom_fields.jpg)
40+
41+
### Create a New Field
42+
43+
On the **Custom Fields** page, you will see a list of existing custom fields.
44+
1. Click the **New** button to start creating a new custom field.
45+
46+
![](custom_fields/step02_click_new_custom_fields_list_view.jpg)
47+
48+
The **Custom Fields** form view will appear.
49+
50+
![](custom_fields/step02a_custom_fields_form_view.jpg)
51+
52+
### Configure Basic Properties
53+
54+
Now, define the basic characteristics of your new custom field. For this example, we are adding a secondary phone number field for individuals.
55+
56+
- **Field Draft Name**: Enter a technical name for the field, such as `secondary_phone`. This name should be unique and follow standard naming conventions (lowercase with underscores).
57+
- **Field Label**: Provide a user-friendly label, like `Secondary Phone Number`. This is what users will see on the interface.
58+
- **Field Type**: Select `Char`, as a phone number is best stored as a text string.
59+
- **Target Type**: Choose `Individual`, because the field will be added to each individual's record.
60+
- **Field Category**: Select `Custom`. This designates the field as a standard data entry field.
61+
- **Field Help**: Specify a text that will appear as a tooltip or description for the field, for example, "Enter an alternative phone number for the individual."
62+
63+
![](custom_fields/step03_set_type_custom.jpg)
64+
65+
### Configure Properties (Optional)
66+
67+
Since this is a standard custom field, you do not need to provide computation logic. However, you can configure its behavior in the **Properties** tab.
68+
69+
- **Required**: Check this box if you want to make this field mandatory for all records.
70+
- **Read-only**: Check this box to prevent users from editing the field's value through the user interface.
71+
- **Index**: Check this box to create a database index on this field. This can improve performance for filtering and searching on large datasets. This option should typically be managed by a developer or system administrator.
72+
- **Copied**: Determines if the value of this field is copied when a record is duplicated.
73+
74+
For our example, we will leave these options unchecked.
75+
76+
![](custom_fields/step04_specify_advanced_props.jpg)
77+
78+
### Save and Open an Individual Record
79+
80+
Once all properties are configured, save the new field.
81+
82+
1. Click the **Save** button. OpenSPP will create the new field in the database.
83+
2. Navigate to the **Registry** and click the **Individuals** menu.
84+
85+
![](custom_fields/step05_open_individual_list_view.jpg)
86+
87+
### Verify the Custom Field
88+
89+
1. To verify that the field was created, open any record in the **Individuals** list view.
90+
91+
![](custom_fields/step06_select_individual.jpg)
92+
93+
2. A new tab named **Additional Details** will appear on the form. Click on it.
94+
95+
3. You should see your new "Secondary Phone Number" field, ready for data entry.
96+
97+
![](custom_fields/step06a_check_additional_field_tab.jpg)

docs/user_guide/indicator_fields/step01_configuration_custom_fields.jpg renamed to docs/user_guide/administration/custom_fields/step01_configuration_custom_fields.jpg

File renamed without changes.

docs/user_guide/indicator_fields/step02_click_new_custom_fields_list_view.jpg renamed to docs/user_guide/administration/custom_fields/step02_click_new_custom_fields_list_view.jpg

File renamed without changes.

docs/user_guide/indicator_fields/step02a_custom_fields_form_view.jpg renamed to docs/user_guide/administration/custom_fields/step02a_custom_fields_form_view.jpg

File renamed without changes.
87.8 KB
Loading
85.8 KB
Loading
144 KB
Loading
106 KB
Loading
113 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)