Last active
September 7, 2015 22:55
-
-
Save NikV/9e96364311a6de8505ec to your computer and use it in GitHub Desktop.
Change the trash link when deleting a form, also changing the format of the input into a button. And few inline styles.
This file contains hidden or 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
function modify_gfroms_trash_link() { | |
return '<button style="background: red; color: white; border: none;" class="submitdelete" title="' . __( 'Move this form to the trash', 'gravityforms' ) . '" onclick="if(confirm(\'' . __( "Would you like to move this form to the trash? \'Cancel\' to stop. \'OK\' to continue", 'gravityforms' ) . '\')){ gf_vars.isFormTrash = true; jQuery(\'#form_trash\')[0].submit();} else{return false;}">' . __( 'Trash', 'gravityforms' ) . '</button>'; | |
} | |
add_filter('gform_form_trash_link', 'modify_gfroms_trash_link'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment