Hiding Fields


I don't like it... please put it away

You can hide fields on the web inerface both, globally and locally.

The HideField method will hide a field on all the TaBliz elements (we call this globally). For example:

dim TBLZ
set TBLZ = Server.CreateObject("Tabliz.adminrecordset")
TBLZ.DatabasePath = "C:\www_odbc\october28\tabliz2000.mdb"
TBLZ.recordset = "MainTable"
TBLZ.HideField "IDMainTable"

The code above will hide the "IDMainTable" field on all the tabliz elements (on the search form , on the editing list, on the edit form). Technically the method adds an element to the HiddenFields collection of each element. This leads us to the code we need to write to hide fields only in some elements of the web inerface.

The EditForm.HiddenFields, the EditingList.HiddenFields and the SearchForm.HiddenFields are the collections where the hidden fields are stored.

If you want to hide a field only in the Editing list you have to write this code:

TBLZ.DatabasePath = "C:\www_odbc\october28\tabliz2000.mdb"
TBLZ.EditingList.HiddenFields.Add "FieldToHideName"

This is hiding fields locally (only on a particular element). You can use the HiddenFields collection with the same syntax on the EditingList, on the SearchForm and on the EditForm.

If you wish to Hide Autonumber Fields in the Edit Form you can set to true the HideAutonumbers property like this:

tblz.EditForm.HideAutonumbers = true