Just below the field definitions in the default.cfg file are the following lines:
Code:
# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# necessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;
Set $db_key to the name of the field where your key will be held. Leave $db_key_track set to 1.
The value is set automatically. You will need to have an input field (although it can be hidden) in html_record_form to hold the ID.
In html_add_form, there is a line
&html_record_form (&get_defaults);
The "&get_defaults" part of the line calls a subroutine that sets any default values you may have defined in the .cfg file and also gets the next ID number. It then passes all the values to the form and puts them into the right fields -- assuming you have the correct field names on the fields.
------------------
JPD