I want to implement the auto save form.
new-form.php
key
to update the previous saved content? And I'm still on new-form.php
What is the logic to save new entry & update after auto save.
Let me know.
first of all you can take a hidden field in form for ex. form_id initially it will be blank, it means it will create form.. when first time form saves it will be inserted to database. and then you return newly inserted id of the form to ajax response on ajax success you can set the hidden field value to newly created form id and now if id of form is passed to php scritp then you can use update query. else insert query.