Save on Edit form returns to Dispform instead of list view

Forums JSLink Save on Edit form returns to Dispform instead of list view

This topic contains 6 replies, has 2 voices, and was last updated by  Brent Caudill 1 year, 8 months ago.

  • Author
    Posts
  • #9007

    Brent Caudill
    Participant

    Hello Alexander,

    After upgrading to the jslink version of DFFS we noticed the behavior when saving the editform.aspx changed from returning to the list view, to now returning to the dispform.aspx page.

    While this is a very nice feature in some instances, I have several lists where this is not the desired behavior. Is there a way to change this back to returning to the list view on save? Some js code or a toggle somewhere?

    Thanks,
    Brent

  • #9023

    Alexander Bautz
    Keymaster

    Hi,
    I suspect the “Launch EditForm in a dialog from DispForm” setting in the Misc tab can be the problem here. Can you enter DFFS backend and look at the Misc tab to see if this is checked?

    Alexander

  • #9025

    Brent Caudill
    Participant

    I just checked both the Edit and Display forms and it is unchecked on both forms.

    Brent

  • #9032

    Alexander Bautz
    Keymaster

    Are you opening the form from DispForm or from a list view? I have done some changes to the “Source” when editing an item from DispForm so it might be this causing the problem.

    Alexander

  • #9047

    Brent Caudill
    Participant

    The behavior only seems to have changed when editing from the DispForm.

    Another thing I have noticed is that if Tabs are not configured, the save from edit will return you to the list view. Even when editing from the dispform. Appears to be something related to having tabs configured.

    Brent

  • #9094

    Alexander Bautz
    Keymaster

    Hi,
    I’ll look at changing this / making it an option for the next release, but until then you can use this code in the custom js in your dispform to override the current DFFS function:

    spjs.dffs.editItemWithTabIndex = function(){
    	var s, r, u = location.href.replace(/dispform.aspx/i,"EditForm.aspx");
    	r = "";
    	s = spjs.$("#tabWrapper").find('li.tabSelected').attr("tabIndex");
    	if(s!==undefined){
    		r = s;
    	}
    	if(spjs.dffs.data.sTabUseCookie){
    		spjs.dffs.setTabCookie(spjs.dffs.data.tabCookieName.replace("DispForm.aspx","EditForm.aspx"),r);
    	}
    	if(GetUrlKeyValue("ContentTypeId") === ""){
    		u = u.replace("&ContentTypeId=","");
    	}
    	if(spjs.dffs.data.editFormInDlg){
    		spjs.dffs.openEditFormInDialog(u);	
    	}else{
    		location.href = u;
    	}
    }

    Alexander

  • #9096

    Brent Caudill
    Participant

    Thanks Alexander! I just added the code and it returns to the list view now.

    Thanks again!
    Brent

You must be logged in to reply to this topic.