StratusForms icon indicating copy to clipboard operation
StratusForms copied to clipboard

StratusFormsLoadChildDDL, loading the non-selected form values after save

Open davidcfk opened this issue 7 years ago • 6 comments

After saving the form, when returning back to the form it doesn't load the child DDL values that are non-selected, only the selected one...

Resolved only when changing the parent list back and forth (this reloads the select, but then you lose the selected option).

davidcfk avatar Oct 02 '18 03:10 davidcfk

I too am having the same issue, it seems you will need to have a promise function as it needs to wait for the page to completely load. I have not had time to dig more into it to be sure.... but from the inital testing that was what I was seeing

btroop202 avatar Oct 02 '18 07:10 btroop202

I was thinking maybe somewhere in the completefunc of the loadForm we could trigger the ChildDDL code... but by the time that swung by, the trigger wasn't even loaded yet... sighs

Maybe I might just try and incorporate the logic into the existing DDL definition instead... surely the difference is just a query.

davidcfk avatar Oct 02 '18 10:10 davidcfk

I tried the same thing, had to drop that (date time issues), will take a fresh look at it later. But if someone finds a solution please share.

btroop202 avatar Oct 02 '18 11:10 btroop202

Ta. Well, I managed to hack my way into it. Turns out there were a few more things wrong along the way, the way it generally conducts the lookup initially doesn't cater for Child lookups (like SP does using SPServices), so that condition needed to be added.

Once that condition was added in the PopulateFormData, I found that when you mimicked the stuff using the standard DDL, the function that is in the SPServices actually doesn't pass the element back for it to finish the part where it has to select the selected entries (curVal).

My current code version fixes this ... but I've fixed so many other things along the way (like option dropdowns that use the text rather than the ID doesn't seem to make sense for me) that I cannot isolate it back to a single commit per issue anymore 👎

I'll update it to my fork, but erh Mark, probably wouldn't bother with the pull-request for now ;)

davidcfk avatar Oct 04 '18 11:10 davidcfk

I have also test and found you will need to a dda promise into the code, because the dropdown list do not fully load in time. I have not gotten time to add that yet, if someone does please share.

btroop202 avatar Oct 12 '18 10:10 btroop202

Is there any update on this?

btroop202 avatar Dec 07 '18 09:12 btroop202