Gossamer Forum
Home : Products : DBMan : Customization :

What's New- Date Question...

Quote Reply
What's New- Date Question...
I have searched for and read other posts related to this, but still can't resolve. Would appreciate your help.

Attempting to install the whatsnew script.

Configured a new date field in my cfg as follows:

'DateEnt ' => [ 6, 'alpha', 12, 15, 0, '', ''],

Tested the new field: Added a record and even though I DID enter a date, an error occured: DateEnt (Can not be left blank)

Then, tried another config [I believe this would auto-fill the field, which would be a better solution]:

'DateEnt ' => [ 6, 'date', 12, 15, 0, &get_date, ''],

Same error occured.

Running on UNIX.

What's going on?
Thanks...
Quote Reply
Re: [jmueller] What's New- Date Question... In reply to
bonk. Anyone?
Quote Reply
Re: [jmueller] What's New- Date Question... In reply to
Weird. You shouldn't get a warning "can't be left blank", as you set "not_null" to "0", so the date field is not actually required. I can only recommend checking your form field names, and what goes on in sub add_record in db.cgi, as well as in sub validate_record.

It's a rather primitive strategy, but what I usually do in such cases is to open a filehandle with a text file at the beginning of db.cgi and then have dbman print the values of all variables I'm interested in to that file. In your case, this would be $in{'date'}, first of all.
kellner
Quote Reply
Re: [kellner] What's New- Date Question... In reply to
found the problem.
Look here >> 'DateEnt ' =>
Eliminated the space at the end before the aportrophe.

Works now.


The mod wasn't what I expected -- It essentially produces a search result with an ERROR if there are no match results...