On a WordPress website I'm using Contact Form 7 and Flamingo to manage contact forms, and store the data.
I've been using [_serial_number] in my emails to identify a submission which is stored in Flamingo. This serial number is added to a link which opens a page, and queries the database for the submission (by serial number) to display all the information online for the user who gets the email.
I've realised today that the serial number is reset for each form you create. Eg. Form 1 submission serial numbers start at 1, and increments to 10 (for example). If I then make Form 2, submission serial numbers start at 1 again.
This is causing a problem because there are multiple posts with the same serial number, so I'm not guaranteed to get the right submission.
I can't see a way of getting the Flamingo Post ID as a mail tag anywhere, I've looked through the code for Flamingo and can't see any hooks that would let me add in the ID of the post as a Mail Tag in CF7.
Does anyone know if this is possible?
I solved this issue by creating and storing my own unique token with each form submission and getting Flamingo posts by that via a meta_query instead of trying to get posts by the serial_number. Unfortunately it won't solve your problem for historical submissions that lack the custom token.