Documentation >> Custom Fields >> Create Custom Fields
Creating Custom Fields
Custom fields are added to a conversation through the administrative interface. There are two steps to adding a custom field: first the field must be created, then added to any templates in which you want to use it.
This page is focused only on the first step: creating the custom field. The steps are simple for anyone who has used Conversant's admin interface before. You just go to the Custom Fields page in your conversation's admin area, type the name of your new field, choose a field type, and submit the form. That's it, you've added a new field to your conversation's message database.
We're going to add a keywords field to our messages, which we can then use to search for messages with those keywords, or we could even use the field in our page templates, perhaps with a "keywords" metatag in the head.
- Go to the Custom Fields page in the admin area
conversationURL/admin/conversations/convName/Custom%20Fields
- Type the name of the new field
We'll use "keywords" for this example.
- Choose a field type from the popup menu
Select "Short Text" for this example. In edit forms, this will display as a regular text-entry field, suitable for a single, short line of text.
- Submit the Form
After you submit the form, you'll see a new form for editing the properties of the text field.
- Edit the Field Properties
After creating a new custom field, you're shown the Custom Field Editor. There is a set of properties common to all types of custom fields, and some custom fields may have some additional properties. Regardless of the type of field you're editing, all of the properties can be seen and edited on this page.
For more information on the properties of custom fields, see the Detailed Look at All Custom Field Types.
- Save the Field Properties
The default properties are good enough for our purposes, but if you make any changes then you must submit the form before continuing.
What Happens?
You might understand custom fields a little better if you know what happens when they're created. This section isn't essential, though, so feel free to skip it.
- Conversant makes sure that you're not using a field name that's already taken. You can't have two custom fields with the same name.
- Conversant tells the database to create the new field.
- The database saves some information about the new field, then adds the field to every message in the conversation. When the field is first created, it's value is essentially "nothing". For example, if the field type will hold text, then this default value is actually nothing: no text (also called the
empty string ). As the fields are added to the messages, they're automatically indexed for the search engine.
- If the database doesn't report any problems, Conversant saves its own record of the new field, including the name, field type, and a few other details.
- Conversant is done creating the field, and your browser is shown the form for editing the field's properties.
View in DG
|