Show / hide the save and continue button

Good afternoon,

Had an unpleasant experience yesterday when I added some Javascript to snippets and it took down the website. Looked at though would take an expert to fix, but luckily after a few attempts with earlier backups managed to restore. As a result I’m wary about adding code not used to. Wanting to remove ‘save and continue’ if an answer is given by customer that we cannot accommodate. If I added to following code to an HTML field, combining the form and field IDs to another field that states cannot offer an insurance quote, could I do this without mucking up the entire website:

gform.addAction( 'gform_post_conditional_logic_field_action' , function (formId, action, targetId, defaultValues, isInit) {
	if (targetId == '#field_616_2' ) {
		if (action == 'show' ) {
			jQuery( '#gform_save_616_footer_link' ).show();
		} else {
			jQuery( '#gform_save_616_footer_link' ).hide();
		}
	}
});