I've been trying to setup my form to have a sort of auto-incrementing field. So that each submission has the value of the previous submission incremented by 1.

Now my current attempt involves an Event handler that will set this value however I haven't found any documentation on how to get the last Form submission using the available PHP API's.

Or am I asking too much of the Forms and should I create an Add-on instead?