Redirect to edit form from other page

rss

Posted by Katy - Apr 22 ’16 at 03:34

HI, I have a form that redirects user from new to edit for additional editing (some workflows attached). I was using this instruction for creating that: http://formsdesigner.blogspot.com/2013/10/how-to-open-edit-form-right-after.html It is working if i am adding items from the New Item link in the list.

But i need to place this form on another site page, so i was trying to do that using this article: http://formsdesigner.blogspot.com/2014/01/publish-designed-form-to-any-page.html and it doesn't work. It gives me "Page not found" error

  • rostislav
    rostislav
    Moderator
    Member for: 8 years 1 month
    #1 by rostislav Apr 25 ’16 at 04:50

    Sorry, it's a bug in the software. For now this is the workaround:

    //need to set the pageListId on page load
    _spPageContextInfo.pageListId = '{' + fd._listId() + '}';
    
    fd.onsubmit(function() {
      //also the path to the edit form must be absolute, not relative
      var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', '/Lists/list/fd_Item_Edit.aspx?ID=');
      fd.sourceFormParam(uri);
      return true;
    });
    
  • Katy
    Member
    Member for: 8 years 10 months 20 days
    #2 by Katy Apr 25 ’16 at 12:16

    [#1]: Thank you for the reply.

    I tried the work around, the ID is picked up, but after that i am getting the following screen:

  • rostislav
    rostislav
    Moderator
    Member for: 8 years 1 month
    #3 by rostislav Apr 26 ’16 at 04:11

    [#2]:

    Check my post again, you seemed to have missed out the part where I change the path.

  • Katy
    Member
    Member for: 8 years 10 months 20 days
    #4 by Katy Apr 26 ’16 at 02:54

    [#3]:  I tried with both links: relative and absolute, and the weird thing is that it always referring to ID=4 and I don’t have item with ID =4 in the list, it was removed early during testing, so apparently the ID is not picked up correctly, I was wrong before saying that it is fine.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 8 months 16 days
    #5 by Dmitry Kozlov Apr 27 ’16 at 06:52

    [#4]: Katy,

    What version of Forms Designer do you use? You can find the version in the lower-right corner of the designer window.

  • rostislav
    rostislav
    Moderator
    Member for: 8 years 1 month
    #6 by rostislav Apr 27 ’16 at 08:23

    [#5]:

    Katy, we've fixed the bug in the current Forms Designer. Please, if you're on SP On-premises, download and install the latest version; if you're on SP Online, clear your browser's cache and it should work as expected. Of course, you will still need to include an absolute path to setUrlParam.

  • Katy
    Member
    Member for: 8 years 10 months 20 days
    #7 by Katy Apr 27 ’16 at 09:08

    [#6]:

    Thank you Rostislav!

    I will test it as soon as my change to update the version would be approved by managment and processed ... That takes some time in the company :-)

  • Katy
    Member
    Member for: 8 years 10 months 20 days
    #8 by Katy Apr 27 ’16 at 09:11

    [#6]:

    Actually... we have 3.0.6 now and i don't see any later versions after that in your version history.

  • rostislav
    rostislav
    Moderator
    Member for: 8 years 1 month
    #9 by rostislav Apr 27 ’16 at 12:41

    [#8]:

    I don't think we've incremented the version number for this.

  • Katy
    Member
    Member for: 8 years 10 months 20 days
    #10 by Katy Apr 27 ’16 at 01:00

    [#9]:  So it will look like we just need to reinstall 3.0.6, correct?

Displaying 1 to 10 of 21 messages
Previous123