Gossamer Forum
Home : Products : DBMan : Installation :

Error: Unable to Add Record

Quote Reply
Error: Unable to Add Record
Can someone help me with this error:

#Database Definitions

ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 50, 1, '', ''],
Middle => [2, 'alpha', 40, 50, 0, '', ''],
Last => [3, 'alpha', 40, 50, 1, '', ''],
Title => [4, 'alpha', 40, 50, 1, '', ''],
E-Mail => [5, 'alpha', 40, 50, 1, 'mailto:', '^mailto:'],
URL => [6, 'alpha', 40, 50, 0, 'http://', '^http://'],
Department => [7, 'alpha', 0, 60, 1, '', ''],
Date => [8, 'date', 12, 15, 1, &get_date, ''],
Address => [9, 'alpha', 40, 40, 1, '', ''],
City => [10, 'alpha', 40, 50, 0, '', ''],
State => [11, 'alpha', 0, 50, 1, '', ''],
Zip => [12, 'alpha', 40, 10, 1, '', ''],
Phone => [13, 'alpha', 40, 15, 1, '', ''],
Fax => [14, 'alpha', 40, 15, 1, '', ''],
Comments => [15, 'alpha', '40x3', 500, 0, '', ''],
Validated => [16, 'alpha', 0, 3, 1, 'Yes', 'Yes|No'],
Popular => [17, 'alpha', 0, 3, 0, '', ''],
Userid => [18, 'alpha', -2, 15, 0, '', '']


# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 18;

**********************************************************
Error: Unable to Add Record

There were problems with the following fields:
0 (Can not be left blank)
Please fix any errors and submit the record again.

**********************************************************

The form is complete filled with the exception of middle name, I have filled it in
to get the same result....HELP...is there another file to manually change variables?????
Quote Reply
Re: Error: Unable to Add Record In reply to
I ran into the same problem, and removing
the E-mail section fixed the problem.
Now I have to figure out how to include back in the list.

Carmen
Quote Reply
Re: Error: Unable to Add Record In reply to
If in doubt, put quotes around your field names 'E-Mail' should work. If still in doubt, use the definition generator:

http://gossamer-threads.com/scripts/dbman/build.cgi

Cheers,

Alex
Quote Reply
Re: Error: Unable to Add Record In reply to
I finally got the email field to work to a degree. The only problem I cannot get it to display the contents or value entered. I would like to be able to automatically click on the e-mail info and href="mailto:alex@test.com".
Quote Reply
Re: Error: Unable to Add Record In reply to
Looking at your first post and why the "Add Record" doesn't work, what is your $db_key? Is it 'ID'? Is there a place where we could see your database?

Regarding your 'E-Mail' field -- I would set it up like

'E-Mail' => [5, 'alpha', 40, 50, 1, '', ''],

You really don't need to have the "mailto:" in the field. In the html_record subroutine (html.pl file), you can display the email as a link in a number of different ways. The easiest is

<a href="mailto:$rec{'E-Mail'}">$rec{'E-Mail'}</a>

which shows the email address and makes it a clickable link.


------------------
JPD