Gossamer Forum
Home : Products : DBMan : Customization :

Making a field optional when adding records

Quote Reply
Making a field optional when adding records
Hi...
When I add records and leave one field blank, I get an error telling me it is blank. How do I make certain fields *optional*.
I made it in the output of viewing the page that if it is blank to ignore it, but what about when adding items? Where would I modify this?

The fields are
Image1,Image2,Image3,Image4,Image5

Here is the portion of my CFG file with it in there:


%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Added => [1, 'date', 15, 15, 1, &get_date, ''],
Category => [2, 'alpha', 0, 255, 1, '', ''],
Name => [3, 'alpha', 40, 255, 1, '', ''],
Description => [4, 'alpha', '40x5', 500, 0, '', ''],
Age => [5, 'alpha', 15, 60, 1, '', ''],
Price => [6, 'alpha', 15, 60, 1, '$', ''],
Thumbnail => [7, 'alpha', 35, 255, 1, '', ''],
Image1 => [8, 'alpha', 35, 255, 1, '', ''],
Image2 => [9, 'alpha', 35, 255, 1, '', ''],
Image3 => [10, 'alpha', 35, 255, 1, '', ''],
Image4 => [11, 'alpha', 35, 255, 1, '', ''],
Image5 => [12, 'alpha', 35, 255, 1, '', ''],


Please advise me where I am supposed to make these optional.

Thanks
Michele

[This message has been edited by Michele (edited October 11, 1999).]
Quote Reply
Re: Making a field optional when adding records In reply to
Michele,

The fields in your CFG that you would like to be optional (not required) should have a "0" instead of "1"
(i.e. ID => [0, 'numer', 5, 8, 0, '', ''], instead of ID => [0, 'numer', 5, 8, 1, '', ''], )

Hope this helps !





------------------
donm
My theory on evolution is that Darwin was adopted.--Steven Wright



[This message has been edited by donm (edited October 11, 1999).]