Custom Save Button On Web Form Step @debajit
I have followed the above articles steps to add a custom save button to a webform step. The issue I am having is that the code seems to do something but the WebForm_DoPostBackWithOptions function seems to do nothing, no new data is being posted back to CRM when the button is clicked.
$(window).on("load", function () {
$fb = $("div.actions input[type='button']:first");
$("<input type='button' id='btnSave' name='btnSave' value='Save' class='submit-btn btn btn-primary form-action-container-left' />").insertAfter($fb);
$("#btnSave").bind("click", function () {
console.log('Save Button Clicked')
WebForm_DoPostBackWithOptions
(new WebForm_PostBackOptions(undefined, '', true, '', '', false, true));
});
});
Would anybody have any idea how I could fix this? I am pulling what little hair I have left out with this one 🤣.
Thanks in advance,
David