Gossamer Forum
Home : Products : DBMan : Discussions :

Validation Problem

Quote Reply
Validation Problem
Help! my DBman has been running quite nicely now for a while until I started getting messages from users about a problem encountered when trying to modify a record.

Firstly, I implemented most of JPDenis great mods like;

Short/Long html
Secure Password lookup
Validation mod
File upload

Now here's whats happening (and tested by myself)

I log in as a user who has permission to add, modify and delete records and add a new record. I then log out and log in again and try to modify the record (note; record has not yet been validated by admin). This action returns an error message stating that "the validated field cannot be left blank". This message means nothing to a user as the "validated" field is only visible to the administrator.

So next I tried logging in as the administrator and validated the record I added as a user. I then logged in again as the user, modified the record and again got the error message stating that "the validated field cannot be left blank"

Can anyone point my nose in the right direction to fix this annoying problem. Thanks

Quote Reply
Re: Validation Problem In reply to
Did you add a "Validated" field to html_record_form, as listed in the mod:

Code:

#####################################
#file: html.pl
# sub html_record_form
#
# Add (probably near the bottom of the form)
#####################################

|; # to close off any previous print qq| statement
if ($per_admin) {
print qq|<tr><td>Validated</td>
<td> |; print &build_radio_field($db_validated_field,$rec{$db_validated_field});
print "</td></tr>";
}
else {
print qq|<input type="hidden" name="$db_validated_field" value="$rec{$db_validated_field}">|;
}
print qq|
Also, did you add the following to your .cfg file?

Code:

# Name of your validation field
$db_validated_field = 'Validated';
JPD
http://www.jpdeni.com/dbman/