Skip to content

Instantly share code, notes, and snippets.

@danielkellyio
Created July 28, 2016 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielkellyio/32848ceb8052f626419973e8b2755b84 to your computer and use it in GitHub Desktop.
Save danielkellyio/32848ceb8052f626419973e8b2755b84 to your computer and use it in GitHub Desktop.
Provide notification of duplication in gravity forms.
//Show Notification of Duped
add_action("gform_editor_js", 'notify_of_dupe');
function notify_of_dupe(){
if($_GET['duped'] === 'true'): ?>
<script>
(function($){
var notification = '<div style="border-left-color:#46b450" class="updated_base gform_editor_status" id="after_update_dialog">' +
'<strong>Form duplicated successfully.</strong>' +
'</div>';
$("#gf_form_toolbar").after(notification);
})(jQuery);
</script>
<?php endif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment