The NWF JS object and SaveForm

  • 25 September 2015
  • 6 replies
  • 5 views

Badge +3

I've been digging around and it seems this is the place to get deep level help. Hopefully someone can answer some stuff for me.

So I've seen people posting about using functions such as NWF.FormFiller.Events.RegisterAfterReady() and I was trying to learn more about what the NWF object can be used to do.  The most I've found on here is this post but I've yet to see any real detail on what can be done with it.

I ended up logging it in the browser for one of my forms and starting to dig through it.  There is a LOT of functions to experiment with, but one that caught my eye was;

NWF.FormFiller.SaveForm()

It doesn't appear to take any parameters, but when I try to run it in the console it just returns "undefined".

Any idea what this can be used for? I was hoping it was self describing, but doesn't appear to actually POST anything.  I'm trying to update the form data to the list without reloading the page using Nintex functionality only.  Any help is greatly appreciated.

Some other functions I saw included;

NWF.Utilities.AjaxPost(service, requestData, cbSuccess, cbError)

NWF.FormFiller.Functions.AjaxPost(service, requestData, cbSuccess);

but I'm not sure what they are requesting for "service" or "requestData"


6 replies

Userlevel 7
Badge +17

Christophe Raucq​ shares some more info on updating values on a form on his blog Update fields before Submitting (Part 2)​. It's like a JQuery object so you will be able to change value of fields directly with a select.

Userlevel 7
Badge +17

Were you able to find your answer? Do you have any additional questions.

Badge +3

Hi Andrew,

Your reply is unfortunately not what I am referring to.  I am not trying to just update a field on the form.  I am referring to saving the form back to the list, without leaving the form.  I wanted to recreate the Save and Continue functionality that is found within InfoPath, and was exploring the NWF object to see if it was possible.

Userlevel 5
Badge +9

I haven't found a way to do what you'd like but you can add your votes here :

Saving without closing a form – Customer Feedback for Nintex

An alternative would be to customise the redirect url of the form (in the form settings) with a url parameter and on this redirected page execute a custom javascript to redirect the user to the edit page of the item.

Hope it helps

Badge +3

Thanks Caroline.  I've implemented something like this, but the client is use to the InfoPath behavior and does not like the load time for the form.  Unfortunately it has a large number of cascading lookups so the form takes a few seconds to load due to the related AJAX calls.

I could alternatively build a REST JavaScript solution, but I was trying to avoid rebuilding default SP behavior.  Would be easier if there was a simple data object I could pull from the NWF object or SP Form that contained the field data in the necessary format to use in a REST API call.

I will have to put my vote in and keep looking for alternatives I think.

Thanks again.

Userlevel 5
Badge +9

Sure, this is a nice feature and often asked by customers (especially customers who had InfoPath).

If I were you, I would wait until the feature is developed by Nintex and explain the customer that it's not possible for the moment.

If you try to develop something in Javascript, there can be side effects and if there are Nintex Forms updates, you may have to review your code.

But if it's really really important for the customer, I think that javascript with a REST API call is the only alternative.

Reply