Defining free fields
To change ClassAd to your personal needs, you have the possibility to define up to ten free fields. These free fields are displayed everytime a new ad is entered, shown or edited. They behave exactly like the "regular" input fields in other forms.
Future versions of ClassAd will support free field definitions for every category or for groups of categories.
Available field types are:
Field type | Type name | Description |
---|---|---|
Checkbox | A checkbox can be activated or deactivated, depending on the agreement of the user. Another function of a checkbox in combination with its definition as mandatoy can be to get a user agreement with, for instance, the terms of use |
|
text input | A text input is used by the user to enter small texts or single words. If the text input should contain initially displayed texts (as shown in the example), the standard text should be set. |
|
Editfield | A text field can be used to get a large amount of user input, e.g. stories, descriptions etc. Like a text input a text field can get a standard text, too. | |
drop-down | When using a drop-down box, an user can choose between a given selection of values. To define a drop-down box, enter the selectable values separated by commas into the Standardtext/Selection/Option-column. If you want to define a initially selected value, enter * in front of the value. The definition for a drop-down box as shown on the left-hand side would look like this: |
|
|
listbox | A list selection behaves similar to a drop-down box and its values are defined in the same way. A multiple selection is not yet supported in the actual program version. |
Option 1 Option 2 Option 3 |
optionfield | An option field behaves similar to a drop-down box and its values are defined in the same way. |
To use a defined free field, the control box "Active" has to be activated.
If a field should be defined as mandatory, the column "Mand" has to be activated. A mandatory field is checked after a form is submitted - if the field is empty, an error sign is displayed and the form will not be processed.
The Option "Srch" (Search) is not yet implemented in version 3.0.
"Name of Field" is displayed in front of the created field, "Description" should give the user more information about the expected value. This is displayed below the field, e.g.
fieldname | description |
When using free field, please keep the following information in mind:
- The use of free fields can be activated or deactivated generally using the parameter $USE_FREE_FIELDS in the configuration file inc/config.inc.php
- Version 3.0 only has one free field definition for all categories. Version 3.0 prof. will be able to store a free field definition for every category in the database
- Every ad in the database stores the free field definition it is created with. That means, an ad will keep its values and definitions stored in the free fields, even if the global definition is changed. Benefits are that the database stays consistent and there is no chance of data loss. At the same time this ist the reason, why the definition of free fields should be done at installation already