Couple suggestions....
1) Copy the
Validate.def file and call it
Hold.def.
2) Create another table called
Hold that should look like the
Validate.def file.
3) You could use some conditional statements in the
process_form routine that will call the particular database based on a trigger parameter like
onhold.
Example: Code:
$hold = = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Hold.def"; AFTER the following codes:
Code:
$val = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Validate.def"; You could also add a query statement to make sure that the link is not already in the
Validate and
Hold tables with the following codes:
Code:
$hold-> query ( { URL => $in->param('URL'), ww => 1 } ); Then edit the following codes:
Code:
$id = $val->add_record ( $rec, $in ); to the following:
Code:
if ($in->param('hold') eq 'Yes') {
$id = $hold->add_record ( $rec, $in );
}
else {
$id = $val->add_record ( $rec, $in );
} 5) Then add the following field in your
add forms in the
add.html and
add_error.html template files:
Code:
<input type="checkbox" name="hold" value="Yes"> Put on Hold These codes may have to be tweaked a bit and you would have to tweak the
validate routines in the
Admin_HTML.pl file to pull data from the
Hold table into the
Links table. But this will give you some idea of what you need to do.
Hope this helps.
Regards,
Eliot Lee