Page 1 of 1

How to display popup form and then save underlying form data on popup close?

Posted: 11 Mar 2014
by eedoh
Basically what I want to do is to have a button that will

-open my related item edit form

-wait until the popup data is saved (or form canceled)

-save the data on my original/underlying form

-not exit the underlying form (stay on it).

Is this possible, and how? Btw, I know how to redirect, and how to open the form in popup etc. My biggest issue is orchestrating everything together ie make the underlying form wait with the fd.save().click() until the popup is closed.


Thanks

Re: How to display popup form and then save underlying form data on popup close?

Posted: 12 Mar 2014
by Dmitry Kozlov
Hello,

You cannot save the parent item automatically when the user saves the child form because the parent form is reloaded after saving of the child. I can recommend you to place 'Save without closing' button onto your parent form. So, your users will be able to save the parent form without closing. Please, click 'Buttons' button on the ribbon of Forms Designer, add new Save button onto your form and re-name it into 'Save without closing'. Next, put the following code into its OnClick property:

Code: Select all

fd.sourceFormParam(window.location.href);
return true;

Re: How to display popup form and then save underlying form data on popup close?

Posted: 12 Mar 2014
by eedoh
I'm really supposed to do all of this on one button click. What our client asks for is to be able to change dropdown list value in order to mark the parent list item as rejected (so I need to save this somehow), and then open new item form in "Rejection Log" list in order to be able to describe reasons for rejection. We're supposed to maintain the rejection log as item can be rejected multiple times before acceptance.

Can you recommend some other way of achieving this?

Re: How to display popup form and then save underlying form data on popup close?

Posted: 13 Mar 2014
by Dmitry Kozlov
I can recommend you to set Rejected value of the parent item in a workflow based on the selected value in the child's drop-down field. As for Rejection Log, you can place the 'Reason' field onto child form and change its visibility based on the drop-down field value. Then copy the description to Rejection Log in a workflow.