|
Admin > Section Editors > Field Editor > List |
Top Previous Next |
|
Field Label This is the text displayed beside the field in the CMS Section Editor.
Field Name This is the name the database and program use to refer to the field.
In your content viewers, you will use some simple code like this <?php echo $record['fieldname']?> to display the field data. If you change an existing fieldname, don't forget to update the name in your viewers and Section Editor details as well.
Field Type These are the different types of fields you can add to your menu. Some fields have different options than others. Note that the separator field type doesn't require a field label or field name to be entered.
Field Options
Options specific to the Field Type appear in this box. For most fields, the defaults will be sufficient, but for "list" fields you will need to set the values for your list options.
Display As This option lets you control how the list is displayed. "Pulldown" displays a dropdown menu, and "Radio Buttons" displays a list of radio buttons.
List Options There are three different ways to enter list options:
User options listed below This is the simplest, just enter the options, one per line.
Tip: You can use the pipe character ("|") character to specify different option values and labels. Like this "option value|option label". The label will be displayed to the user and the value will be saved to the database and displayed by the viewers. If you need to enter a ("|") by itself, just use two to escape it, like this ("||").
Get options from database (advanced) This is more advanced. Select a database table, a field for values, and a field for labels. The two fields can be the same. This will return a list of all the values from that field. Use this to return lists of categories from another section, user names, etc.
Get options from MySql query (advanced) The most advanced. If you are comfortable with MySql you can enter a MySql SELECT query here and it will be evaluated to get the list values and labels. Make sure your query returns two columns.
Input Validation
This allows you to make specific requirements for what gets entered into the field. At the most basic, you can make the field required or unique, and for text fields you can enter a list of characters to allow or disallow.
Required This option requires the user to enter a value for the field. An error will be displayed if the field is left blank.
Unique This option requires the user to enter a unique value for the field. An error will be displayed if another record has the same value.
Advanced Options
System Field System fields cannot be edited and have no modify or erase link unless "System Field Editing" is enabled (under Advanced Commands on the field list page). The purpose of this setting is to make it harded to accidentally or unknowingly change a program field that might otherwise break things.
Admin Only Fields with this option set will only be visible and can only be modified by Admin users in the Section Editor.
|