Created
July 28, 2016 17:43
-
-
Save danielkellyio/32848ceb8052f626419973e8b2755b84 to your computer and use it in GitHub Desktop.
Provide notification of duplication in gravity forms.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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