Gossamer Forum
Home : Products : DBMan : Installation :

Textarea and date

Quote Reply
Textarea and date
1) I get this error: error building textarea field: textarea field definition incorrect in config for field ''! (when I select "view" in my DB...

I used the resource modification "Autogenerate Enhancements"...maybe this is why?

2) I have a "date" field, but is there a way to automatically fill in the current date?

The URL is:http://www.smallbiztechnology.com/cgi-bin/dbman/db.cgi?db=smbprtech

Just use admin/admin
Quote Reply
Re: Textarea and date In reply to
Looks like there's some other problem in your .cfg file.

I'll take a look at the file if you will copy it to a web-accessible directory -- one where you would place html files. Rename the file to default_cfg.txt. Then come back here and tell me where it is and I'll see if I can find the problem.


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





Quote Reply
Re: Textarea and date In reply to
1) Thanks for your time and patience
2) http://www.smallbiztechnology.com/db.txt (the cgi file) and smbprtech.txt (the cfg file)


Quote Reply
Re: Textarea and date In reply to
 
Code:
DateAdded => [12,'alpha', -1, 15, 1, &get_date, ''],

Be sure not to put any quotation marks around it.


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





Quote Reply
Re: Textarea and date In reply to
1) I put this in the cfg file:

# Textarea fields. Field name => '[columns]x[rows]'.
%db_textarea_fields = ( Comments_Remarks => '40x3',
PressRelease_Info => '40x3'
);

2) and this in the db.cgi file:

sub build_textarea_field {
# --------------------------------------------------------
# Builds a TEXTAREA field based on information found
# in the database definition. Parameters are the column to build
# and a default value (optional). my ($column, $value) = @_; my ($output);
unless ($db_textarea_fields{$column} =~ /(\d+)x(\d+)/) {
$output = "error building textarea field: textarea field definition incorrect in config for field '$column'!";
} else {
$output = qq|<textarea name="$column" cols="$1" rows="$2">$value</textarea>|;
} return $output;}

3) Also I wanted http:// to appear in a text box, but it won't?

ProductURL => [9, 'alpha', 40, 255, 0, 'http://', ''],
Quote Reply
Re: Textarea and date In reply to
These are the things I see wrong with your database right now.

The first one is my fault. I had a mistake in the mod. Your textarea field definitions should be

Code:
PressRelease_Info => [10, 'alpha', 0, 500, 0, '', ''],

I added extra '' around the 0 for the field length. My bad.

In your select fields, you have

Code:
Category => 'Software, Hardware, Internet Site, Hosted Application'

You need to take out the spaces after the commas:

Code:
Category => 'Software,Hardware,Internet Site,Hosted Application'

Same with your checkbox fields. Also, your checkbox fields need to be all on one line

Code:
Description => 'Software-Utility, Software-OS, Software-Utility, Software-Financial,
Software-BusinessApplication, Software-Other, Hardware-DesktopComputers,

should be

Code:
Description => 'Software-Utility,Software-OS,Software-Utility, Software-Financial,Software-BusinessApplication,Software-Other,Hardware-DesktopComputers,

You have

Code:
$auth_modify_own = 1;

You can only use that if you have a field for the userid. Otherwise the script won't have a place to put the userid, and therefore won't know who "owns" the record.

None of this, however, tells me why your textarea isn't working correctly, nor why your default value doesn't show up in the ProductURL field.

What I would do is put back the old build_html_record and build_html_record_form subroutines. Redefine your textareas the way the original script says to.

If it works then, we'll know there's a problem with my mod. If not, we'll know there's a problem with your .cfg file.

That's the only way I know to narrow down the problem.


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





Quote Reply
Re: Textarea and date In reply to
Ray--

You responded in the other thread, but I think you meant to respond here. (No biggie. Smile )

To change your password, log in as "admin/admin" like you've been doing, and then click the "Admin" link. Create your own username and password, making sure that you click all the boxes at the bottom of the screen.

Then go back to the login screen and use your new username and password. Go to the Admin link again, and delete any of the usernames that you don't want to keep.


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