Set default value for next submission based on last submission

I have a public form with a "Sample ID" text field that contains a number that should increment by 1 with each new submission. I would like to provide that value as a default instead of requiring the user to type in a new value.

Currently when the user clicks "submit", the form remains open but all of the field values are deleted. Instead, I want the "Sample ID" field to already be populated, but the default value will change with each submission.

Dear @donald.kantik,
You can get the latest ID on button click and save the form with the following code:

pnp.sp.web.lists.getByTitle("List Title").items.select("ID").orderBy("ID", false).top(1).get().then(function(items){
  fd.field('Title').value = items[0].ID;
  fd.save();
});