can i create a submit button on a form?

Confluence User - 15 Oct, 2016

Hi Guy's,

Is there any way to create a submit button on a form?

Thanks,

 

 

 

forms

2


17 Oct, 2016
confluenceUser
confluenceUser

Hi, you do not need to manually add a button to a form. An appropriate submit button will automatically be displayed in the form when the form is displayed in a userview.

21 Oct, 2016
confluenceUser
confluenceUser

if you really want to add your own custom button. you can use jquery javascript as follow

// Add Save as Draft Button
$(document).ready(function(){
	var draft= $('<input id="saveAsDraft" name="draft" class="form-button" type="submit" value="#i18n.saveAsDraft#"/>');
	draft.insertBefore($('input#submit.form-button'));

	$('input#saveAsDraft.form-button').on('click',function(event){
		event.stopPropagation();
		$("input[name='status']").val(0);
		$('input#submit.form-button').trigger("click");
		event.preventDefault();
	});
});
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print