Hello everyone,
I am trying to override the functionality of the Save button on a list form by using jQuery. I can do the override just fine, but when the item is saved, not all the fields are being saved. As of now I am using the OOTB form because it contains People Pickers, and I don't want to create a custom form because I don't want to lose the functionality of the client-side people picker.
On the Save button override, I am having the users submit the item and then redirect to the Display form containing the new item ID. As I mentioned above, all this works fine, except for some of the fields not being saved. I have posted the code below for review. Thank you in advanced.
$(btnSave).prop("onclick", null);
$(btnSave).click(function(){
var SubmitButton = $(this).attr("name");
var aspForm = document.forms['aspnetForm'];
var oldPostbackUrl = aspForm.action;
var currentSourceValue = GetUrlKeyValue("Source", true, oldPostbackUrl);
var newPostbackUrl = oldPostbackUrl.replace(currentSourceValue,"DispInProgress.aspx");
if (!PreSaveItem()) return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(SubmitButton, "", true, "", newPostbackUrl, false, true));
});Fausto Capellan, Jr - SharePoint Admin