Page 1 of 1

Parent form postback when using Related Items within form

Posted: 08 Jun 2016
by Jdubs
So, I'm in a bit of a conundrum. I don't know if I can fix it :(

In my regular form, I capture the time when the form is opened; I then capture the time when the form is closed within the on.submit function and use that to get how many seconds the form is opened total.

That's been working fine for months now.

However, I added a "Related Items" section to the form and noticed that when you save a Related Item (that's opened in a dialogue box), it resets the parent form and my code no longer works anymore.

I dunno what I'm asking ... is it possible for the Related Items section to not affect the parent form at all until the user clicks "Save" on the parent form?

It seems as if the Related Items force submits the parent form, and I'm just not clear enough on how all that functionality works to try and make my exisiting code still work as intended.

Re: Parent form postback when using Related Items within form

Posted: 09 Jun 2016
by Dmitry Kozlov
Hi,

SharePoint refreshes the parent form with postback after adding/editing child items, so a user will not lose populated data. You only need to check in your script whether the field containing opening time is already filled-in and do not modify it in this case.

Another option is using grid mode:
http://spform.com/forms-designer- ... point-form

Re: Parent form postback when using Related Items within form

Posted: 10 Jun 2016
by Jdubs
Thanks Dmitry.

I was using a local variable to capture this information (vs. storing the value in an actual SharePoint field).

After lots of trial an error, your post helped me to get to viable solution.

Much appreciation.