Save and create new item

rss

Posted by mcgaafar - Apr 5 ’16 at 11:37

Hi,

I would like to add a "Save and add another" button on my new form which will save the current item and then redirects to a new blank form to add another item. How would i do that?

 

Thanks,

  • rostislav
    rostislav
    Moderator
    Member for: 7 years 6 months 25 days
    #1 by rostislav Apr 6 ’16 at 05:29

    Hi,

    Easily, using fd.sourceFormParam. Place in the onclick handler:

    fd.sourceFormParam('https://example.com/Lists/mylist/fd_Item_NewForm.aspx?List=fbab5dd0-ab88-4daa-b9f9-95330c511f9d');
    // or you can even use the following if you're on the new form already
    //fd.sourceFormParam(window.location.href);
    fd.save().click();
    
  • mcgaafar
    Member
    Member for: 6 years 10 months 13 days
    #2 by mcgaafar Apr 6 ’16 at 06:07

    [#1]: Thanks a lot, this worked.

Displaying 1 to 2 of 2 messages