When a form entry is duplicated, I update the data to change the date to the current date with a php function:
add_shortcode( \'duplicate_entry_form\', \'frm_duplicate_entry_form\' );
function frm_duplicate_entry_form( $atts ) {
$old_id = $atts[\'entry_id\'];
if ( ! empty( $old_id ) && ! is_numeric( $old_id ) ) {
$old_id = absint( $_GET[ $old_id ] );
}
$new_entry_id = FrmEntry::duplicate( $old_id );
$updated = FrmEntryMeta::add_entry_meta($new_entry_id, 270, null, date(\'Y-m-d\'));
if (!$updated){
FrmEntryMeta::update_entry_meta($new_entry_id, 270, null, date(\'Y-m-d\'));
}
return FrmFormsController::get_form_shortcode( array(\'id\' => $atts[\'id\'], \'entry_id\' => $new_entry_id ) );
}
The table view shows the correct updated data, however the detail view shows the old date.
When looking at the entries page in the backend, the date is correct. It’s only the detail view which is wrong.
What could be causing this discrepancy? If the table and detail views read from the same table, is there a way to force the detail view to fetch new data?