Page 1 of 1

Save and create new item

Posted: 05 Apr 2016
by mcgaafar
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,

Re: Save and create new item

Posted: 06 Apr 2016
by rostislav
Hi,

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

Code: Select all

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();

Re: Save and create new item

Posted: 06 Apr 2016
by mcgaafar
Thanks a lot, this worked.