I have a WordPress site using CF7, Dynamic text plugin and ACF. I send a user an email containing a URL that when clicked opens up a custom post type specific to that user. The post has a CF7 form on it and when the user clicks submit I have a function that updates the post category to ‘private’ and alters a status field from ‘open’ to closed’.
The category ‘private’ is locked to just admin users with UM Members.
When the user clicks the email the post type single.php has code to check if the form loaded is ‘open’ and ‘public’. Idea being that if it has already been submitted then the status would be ‘private’ and ‘closed’.
This all works (status changes etc) but unless i manually clear the cache, after the user has submitted, the url still takes the user to a ‘live’ form to edit and they can resubmit data (not what i want).
I’ve trawled for some direction and I think I either have ot clear the cache on submit (which I’m not sure is possible) OR somehow stop the page caching in the first place? I’m guessing at this point.
2