the web front-end for your database

Field Preferences

The Field Preferences is where you setup the properties for a field.

You can view the last part of the video Adventure Works in 5 Minutes to get a quick walkthough of the Field Preferences.

To access the Field Preferences you would click on the gear next to the field caption.  Depending upon the field type, the preferences that appear can be very different. 

Each of the field types and their preferences are explained below.

Numeric Fields

The numeric field type covers all integer and non-integer numeric field types.

dbFront - Field Preferences

  • Caption: Sets the caption used beside the field or in the table column.
  • Readonly: Can be used to prevent the field from being edited by the user.
  • Required: The field may or may not be required on the database.  This allows you to adjust what the web form requires.  This can be used to make a field required that the database does not require.  It can also be used to remove the requirement in the form in those cases when it is automatically populated by a table default or a trigger.
  • Audit Value: Used to record audit information:  See: Audit Values.
  • Format String: Used to format the number in the table and reports.
  • Contraints: Allows you to add extra contraints to what a user can enter.
    • Min Value: Force a minimum value.
    • Max Value: Force a maximum value.
    • Decimal Places: (Hidden for Integer fields)

Regular Expressions can be used to validate the numeric fields.  This validation is described below.

Text Fields

The text field type covers all types of text fields up to and including text blob fields.

dbFront - Field Preferences - Text

  • Caption: Sets the caption used beside the field or in the table column.
  • Subtype: Optionally select special functionality.
    • Base: Use the base numeric functionality.
    • Password: This will be treated as a password field.  This also triggers the creation of a confirmation field.
    • HTML: This allows you to specify that a HTML editor should be used.
  • Readonly: Can be used to prevent the field from being edited by the user.
  • Required: The field may or may not be required on the database.  This allows you to adjust what the web form requires.  This can be used to make a field required that the database does not require.  It can also be used to remove the requirement in the form in those cases when it is automatically populated by a table default or a trigger.
  • Audit Value: Used to record audit information:  See: Audit Values.
  • Format String: Used to format the number in the table and reports.
  • Contraints: Allows you to add extra contraints to what a user can enter.
    • Max Length: Force a maximum value.

The following HTML edit widget will be used if the field Subtype is set to HTML.

dbFront - Field Preferences - HTML

Regular Expressions can be used to validate the text fields.  This validation is described below.

Regular Expression Validation

For both numeric and text fields can be validated by Regular Expressions.   This can be setup on the second tab named Regular Expression.

dbFront - Field Preferences - RegEx

To setup a regular expression validation you need to specify an expression that must evaluate to true and optionally you can set a help message which will be displayed to the user if the field contents don't pass the validation.

For help in creating regular expressions you can try out sites like:

Lookup Fields

dbFront will automatically generate lookup fields whenever it sees a foreign key pointing to a parent table.  If the foreign key is a multicolumn key then dbFront will automatically create a cascading set of lookup fields. 

Lookup fields, regardless of base type (Numeric or Text) are treated the same.

dbFront - Field Preferences - Lookup

On the Main tab you have the ability to set the basic preferences of Caption, Readonly and Required.

  • Caption: Sets the caption used beside the field or in the table column.
  • Readonly: Can be used to prevent the field from being edited by the user.
  • Required: The field may or may not be required on the database.  This allows you to adjust what the web form requires.  This can be used to make a field required that the database does not require.  It can also be used to remove the requirement in the form in those cases when it is automatically populated by a table default or a trigger.
  • Audit Value: Used to record audit information:  See: Audit Values.
  • Force Server Lookup: Setting this value will force dbFront to always go back to the server to populate this lookup dropdown.   This is needed for lookup tables that are large and which change frequently.

dbFront - Field Preferences - Lookup Details

The Lookup Details tab is where you can select the fields you want used for the dropdown contents.   This will also select the values that are displayed in the Table at the top of the screen.

Object Fields

dbFront treats binary fields (Blob or VarBinary) as attachment storage fields and gives you the ability to upload, view and download the attachments.  For more details see: Object Fields.

Field Layout

dbFront - Field Preferences - Lookup

The layout of individual fields can be affected at multiple different levels:

  • The database specific CSS file and Default Label Position are determined by the Database Preferences.
  • The Column Spacing and Default Label Position can be determined by the Table Layout.
  • A Layout Group can be used to group fields for input or styling purposes.

 On the Layout table you can:

  • Layout Group: Create, Assign or Remove a field from a layout group.
  • Label Position: Override the Default Label position.
  • Css Class: Assign a Css Class to the field for easy formatting.
  • Hide if Empty and not editable: Especially useful for Object (Image) or Memo fields.  Removes the field from the display when there is nothing to see and nothing a user can do with it.

Next Step

Once all of the field preferences are set as needed

Content you want the user to see goes here.
close