Here is a video to explain my question with more detail
https://1drv.ms/v/s!AliXzQjC69RriXjtRp5ErqBbdJWu
Hi @rossanderson,
Trust you are doing good, and thank you for reaching out to us.
I am afraid this is not possible with Forminator out of the box. And it will be very complex to re-assign the submission ID as it will require many updates in the database end. The submission ID is a unique identifier of form submission, and it’s not recommended to alter it in any condition.
Kind Regards,
Nebu John
Is there a way to custom code and option to check what the ID numbers are of the submissions in the submission section in the plug-in and if there is a 3 for example the next submission will be ID number 4 like it works out of the box but if it checks and it does not say ID number 4 in the submission section the newest submission will be submission number 4 since it will be concurrent and it will check the submissions tab in the plug-in to see what submission ID goes next in chronological order?
I hope there is a way to code it this way.
If that is not possible when you are on the submissions section of the plug-in and you delete the submission with the ID number 4. Is there anyway that when you click the delete button to delete a submission it also well delete it from the database
Hi @rossanderson
I understand what you need here but it isn’t possible “out of the box” and deleting submissions wouldn’t also work for this.
There are two main reasons for this:
1. submission IDs are IDs that are auto-incremented by the database itself;
It’s not Forminator plugin (its code) that sets it but just the DB engine on server when submission is saved to the DB. It just “knows” that the ID field has to be incremented automatically by 1 and does that. Now if a given submission (DB row) is removed, DB engine will not automatically “re-assign” the IDs (numbers) – it’s just not how it works and unless we make Forminator generate some custom numbers in addition to that submission ID, it will not happen.
2. submission IDs are not “per form” but rather “per plugin”;
Formiantor stores all submission in the same single DB table which means that if you have e.g. 2 forms on site then the ID number will change regardless of whichever form was submitted. What I mean is that you won’t have submissions 1,2,3 and so on for “form 1” and 1,2,3 and so on for “form 2” – the numbers will be “mixes” between these form.
For example:
– form 1 submitted – id 1
– form 1 submitted – id 2
– form 2 submitted – id 3
– form 1 submitted – id 4
– form 2 submitted – id5
– and so on…
——-
So for this to work there would have to be a custom number generated and stored in form submission first but to make it more complex it would have to check if there are any “free” numbers that are “lower” than then last one generated for the newest submission.
This is doable but it requires quite a bit of advanced custom coding and I’m afraid it would go out of the scope of this support.
Kind regards,
Adam
Hello @rossanderson ,
We haven’t heard from you for a while now, so it looks like you don’t have any more questions for us.
Feel free to re-open this ticket if needed.
Kind regards
Kasia