Ok, got it working. To the cards.php file I added the following code:
- Code: Select all
// Duplicate Record function
function block__after_edit_record_form() {
$currentRecord = Dataface_Application::getInstance()->getRecord();
$keyval = $currentRecord->val('key');
echo("<a href=\"http://www.gasilvis.com/Eggen/index.php?-action=copy_replace&--copy=1&key=$keyval\">Duplicate this record </a>");
}
This gives me a clickable point at the bottom of the edit form that will duplicate the current record.
A side affect of using the action-copy_replace is that the current set is redefined at completion to a set with one record, the new record. It would be nicer to still be in the edit page with the current set increased by the copied record.
Thanks again for the help,
George