I posted this questions earlier, but thought if I displayed the code I was using, it would be easier to get help.
Background: I have added a field to the CATEGORY database called AllowSubmit, which is a Yes/No field. The object is, using hard-coded categories, if a person tries to submit to a category that AllowSubmit is set to NO on, it will display a message telling the submitter to go deeper into the directory.
Problem: I am unable to access the new field.
I have the following code placed in site_html.pl before it displays the add screen. $category is the name of the Category and I know this variable is set correctly because it is working within this same routine. Field 8 in my category.db is the AllowSubmit field.
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp;
@data = &split_decode($_);
if ($data[1] eq $category {
$allow = $data[8];
last LINE;
}
}
close DB;
if ($allow eq 'NO') {
&reject_submit
}
The odds are it is something small that I am missing.
Background: I have added a field to the CATEGORY database called AllowSubmit, which is a Yes/No field. The object is, using hard-coded categories, if a person tries to submit to a category that AllowSubmit is set to NO on, it will display a message telling the submitter to go deeper into the directory.
Problem: I am unable to access the new field.
I have the following code placed in site_html.pl before it displays the add screen. $category is the name of the Category and I know this variable is set correctly because it is working within this same routine. Field 8 in my category.db is the AllowSubmit field.
Code:
open (DB, "<$db_category_name") or &cgierr("error in validate_records. unable to open db file: $db_file_name. Reason: $!"); LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp;
@data = &split_decode($_);
if ($data[1] eq $category {
$allow = $data[8];
last LINE;
}
}
close DB;
if ($allow eq 'NO') {
&reject_submit
}
The odds are it is something small that I am missing.

