You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know we have the gravityview/duplicate-entry/duplicated hook but perhaps it's time to implement an UI for that?
The idea is to mimic the functionality already present in the Delete tab, but for duplicating entries. I think we can even use the same tab to avoid creating a new one since the Delete tab only has two items.
Code suggestion:
add_action( 'gravityview/duplicate-entry/duplicated', 'gk_run_stuff_after_duplication', 10, 2 );
functiongk_run_stuff_after_duplication( $duplicated_entry, $entry ) {
$form_id = $duplicated_entry['form_id'];
$run_on_forms = [157]; // The IDs of the Forms you'd like to affect.if ( ! in_array( $form_id, $run_on_forms ) ) {
return;
}
// Redirect to the desired URL.$url = 'http://www.website.com/page/';
wp_redirect( $url );
exit;
}
The text was updated successfully, but these errors were encountered:
Context
It seems like there are plenty of folks who want this functionality: https://secure.helpscout.net/search/?query=tag%3Aduplicate%20entries%20redirect
I know we have the
gravityview/duplicate-entry/duplicated
hook but perhaps it's time to implement an UI for that?The idea is to mimic the functionality already present in the Delete tab, but for duplicating entries. I think we can even use the same tab to avoid creating a new one since the Delete tab only has two items.
Code suggestion:
The text was updated successfully, but these errors were encountered: