I have a gravity form and I want to write the values of the fields to a server file, before submission, to capture people who don’t finish the form. I know there is a partial entries add on but I wondered whether this would be possible using node js?

I was thinking of an onblur event that writes the field value to a file.

If this is possible, how would I link this to the gravity form itself ? Where do I place the code? Can’t put js in functions.php so maybe use the css class option on the fields ?

Any advice appreciated.


I assume you want to save the value to a third location besides current website. If that's the can you use gform_pre_submission action to fire an ajax call with all form value.

On the other side of the ajax call you can write a tiny api with node.js that will capture the data and write to your desired location.

gform_pre_submission action also can be form specific. All you have to do is to append the form id like this gform_pre_submission_5. Here 5 is form id.

Read more about the action here in official documentation.

  • Thanks for your reply. The problem here is this hook won’t fire until the user actually clicks submit. I want to save the field values onblur (or I could save all the fields when the page is exited, if possible) so I know what was entered if the user didn’t submit. I was planning on writing these values to a file on the same sever. Probably encrypting it too. – billyqureshi Jun 14 '20 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.