Editing
Top  Previous  Next


The edit / manage schema system involves 2 processes/windows. When you select a schema to edit, you'll first be presented with a list of the columns that make up the database table. From this screen, you may either click the column name to edit it's specific properties in detail, or use the drop lists to control the display order (when an input form is drawn based on this schema) of the fields in this table. Generally speaking, you'll want to do all of your changes from the master list on this screen for quick things like changing the prompts, field display order, toggling what is required, etc. Should you need to get into the column specifics (such as to define the items to show up in a "SELECT SINGLE" input type, you'll need to click on the column name to open up the column editor.

langtables





Upon clicking a column name, you'll be presented with the column editor window:


schema3

Use this to control the appearance and data integrity for this column. These settings are used when drawing input forms for the table, as well as for data integrity checking when information for this table is to be saved in the database.

Table Name:
The name of the table this schema defines.(Read Only Property)  

Layout Name
The name of this schema (Read Only Property)  

Field Name
The name of the database column (Read Only Property)  

Prompt
The text to use when drawing an input form to prompt the user for input. This can be of any length, and may optionally include HTML, if you need to emphasize something.  

Required?
A flag indicating whether or not this column must have a value when a record is created or saved (Y=required, N=optional).  

Validation
You may enter any valid PHP or HTML regular expression in this box, to have the field input validated to your liking.  

Default Value/Options

Enter here, the default value to populate the form field with.  
 
If your input type is a Select List, Check Box, Radio Button, or Custom, use this field to define the values that'll appear to the user as options. They'll only be able to select or choose from the values entered here. If you wish to manually define the options, as we do in this example, separate option values with a pipe symbol ("|").  
 
Generally, you're going to make the list of options a straight set, such as "USA|England|France". There are times, however, where you may want to have the drop down list show something that makes sense, but actually store something else in the database when selected. As an example, you might show the name of the states in the list, but only save their 2 letter abbreviation. To accomplish this, what you'll do is create the relationship of what to save and show, separated by a double colon (::), and then separate those with pipes. Here's a short states example:  
 
Washington::WA|New Jersey::NJ|Pennsylvania::PA  
 
In this short example, the drop list would show "Washington, New Jersey, and Pennsylvania". When the user selects one of these states and saves the form, the database will actually store either "WA, NJ, or PA" This allows you to get more creative with your lists if you need to.  
 
If you'd like to have the option list dynamically generated by a function within the program, you may specify a function name as follows:  
 
function=function_name()  
 
"function=" is required, to indicate that this is a "function" call.  
function_name()  indicates the name of the php function to run to populate this drop down list.  
 
Note that within the admin centers of various applications, we have many functions in place already (and the proper entries in the schemas) for use by this function system. Changing or modifying them is to be done at your own risk.... We recommend not altering pre-existing "function" values or adding new ones unless you're writing a new ds/X application, as you may be unwittingly breaking some part of the internal systems.