Custom Field Editor
From DotProjectWiki
Contents |
The custom fields editor allows you to add more fields to many of the records that are kept in dotProject. This is helpful if you want to record more information about a Company (for example) in the case that the existing add/edit page does not provide enough detail.
The custom fields editor is located in the System Administration module under Preferences.
You can add custom fields to many of the modules in dotProject, currently you can add custom fields to the following modules:
- Companies
- Projects
- Tasks
- Calendar (When Editing an Event)
There are several types of fields you can use depending on how you want to edit/display the information:
- Text Input - A simple text box
- Text Area - A much larger text box
- Checkbox - Tick On/Off
- Select List - Shows a list of options to pick from.
- SQL Query Select List - Shows a list of options based on an SQL Query you specify.
- Label - Shows some text that the user cannot edit
- Seperator - Shows a horizontal line, that you can use to visually seperate fields.
- Weblink - Shows a link that the user can click, requires the full URL.
- As of 2.1.2 a new option of File for inclusion in PROJECTS only.
1 Example: Adding a Custom Field
Here is a quick walkthrough for adding a custom field. In this example I'm going to add a tax number field to the companies module so I can record a tax number with every company i add.
- Click the link "Add a new custom field to this module" underneath the module that you are adding the custom field to. I'm adding a field to the companies module so I would click the link underneath Companies.
- Enter the field name/identifier. This should be a short name with no spaces or punctuation, the editor will remove any spaces or punctuation if you try to add any. The field name is not shown to the user. I'm going to use taxnumber as my field name for the example.
- Enter the field description. This is the label that is displayed to the user, it sits next to the empty text box so the user knows what kind of information should be entered. For the example I will use "Tax Number".
- Select from one of the field display types. The type names are fairly self explanatory, i want just a text input box for the tax number so im using Text Input. The procedure is the same for most types of fields except the select list where you enter the items in the list one by one in the area provided.
- If you know HTML you can add some custom options to the tag in the HTML tag options section.
- Click "Add" to Proceed.
And there you go, the custom field has been added to the companies module. Now when I go to companies and add a new company i have a new Tax Number field to fill in.
2 Editing and Deleting Custom Fields
Editing a custom field follows the same sort of procedure as adding a field. To edit one of the fields you have already added, click on the Edit link next to the description of your field. The edit page is the same as the one used to Add custom fields. Be aware that if you change the field type the results might be unexpected. You can safely change the type back to its original setting and your custom field data will be displayed as normal.
To delete a custom field click on the delete link next to the field description. Deleting the custom field means that you can no longer retrieve the custom field data associated with it by any conventional method.
3 Changing the order of custom fields
If you want to re-arrange the order in which the fields are displayed [1]:
- Make sure you are in the custom field editor
- Locate the module eg. "Companies" that contains the field that you want to re-order
- Click the down or up triangles next to the name to move that item up or down
Thanks to dev team member mosen for this functionality and for the user notes
4 Adding Custom Fields to Helpdesk
Thank you to forum participant jlanders for this - there is now some documentation on how to do this at the end of this thread:
http://forums.dotproject.net/showthread.php?t=8258
5 Footnotes
- ? As at February, 2007 this option will only be incorporated in the HEAD Branch development - to be included in the first official 3.x release
