Parent form postback when using Related Items within form

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Jdubs
Posts: 73
Joined: Fri Dec 19, 2014

08 Jun 2016

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.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

09 Jun 2016

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

Jdubs
Posts: 73
Joined: Fri Dec 19, 2014

10 Jun 2016

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.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests