Page 1 of 1

Auto Save and redirect to edit form

Posted: 23 Jul 2019
by AlexCornell
I have a parent form to which you can add child items from a second form. It appears the form id is not created until the document is saved. This is causing the child items to not be tied to the parent form if the child item is added prior to the initial save of the parent document. Is there a way to autosave and redirect to the edit form after the title field is filled in by the customer?

I'm currently using Forms Designer Client 3.1.5. Would updating to the newer version of the software help with this issue?

Thank you for any assistance.

Alex

Re: Auto Save and redirect to edit form

Posted: 25 Jul 2019
by mnikitina
Hello Alex!

Please use the below code in JavaScripr Editor in New View to redirect the user to the Edit form after item save.

Code: Select all

fd.onsubmit(function() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_Edit.aspx?ID=');
fd.sourceFormParam(uri);
return true;
});
Please have a look at this article for more information.

Re: Auto Save and redirect to edit form

Posted: 26 Jul 2019
by AlexCornell
Thank you for your response. Forgive me for my ignorance, should this code be entered in the main() method of the form, outside of the main method where Im declaring variable of in the onClick section of my save button. Im new to both Forms Designer and Javascript but have been assigned to support this project. Thank you for your assistance.

Have a good day.

Alex