I have a custom HTML form and I need to add a second save button to my form on the top.
So I created my button and can not find the right javascript function that will submit my form. Basically, I just want the SAVE button from the bottom of the form, a second time.
What is the save function then?
I tried but without full success. It seems to submit but dont close the form after:
<script>
//Save function
$('.saveForm').click(function() {
$("input[value$='Save']").attr('value', "Submit");
});
//Set up button
$( ".saveForm" ).button();
</script>
If I use the debugger from Internet Explorer, I can see the following code for the SAVE button. Could it be reused somehow?
onclick="
if (!PreSaveItem()) return false;
if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ2')) return false;
WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ctl39$g_72f104b2_2e10_4b81_9692_a4c10eacd37f$ctl00$toolBarTbl$RightRptControls$ctl00$ctl00$diidIOSaveItem", "", true, "", "", false, true))"