Conditionally save form submissions

Hi, I created a quiz with the quiz addon. I would like to save submissions based on the page where the quiz is embedded. The background is that the quiz can be run as a test run where no data should be saved. So on a public page no submissions should be saved to the database and on a private/password protected page (that contains more fields like names, etc.) submissions should be saved to keep record of them.

Is there a way to achieve this or do I need two separate forms? If two separate forms is there a way to have both of them use the same questions so that changes are in only one place?

Thanks

@travislopes Can Entry Automation trash/delete entries conditionally? If so, it seems like that could be a viable solution here. Save all entries by default and use Entry Automation to delete entries that weren’t submitted on a private page, possibly storing that data in a Hidden field on submission.

Hi David, thanks for the reply.

I was hoping for a solution that doesn’t save by default and only saves when the form is called on a certain page. I think this would be a safer solution regarding GDPR and also way easier to keep track of the actual quiz entries that we are interested in.

I managed to conditionally hide all personal fields with {embed_post:ID} when the form is not called on the private page but I just can’t change the form submission behavior conditionally.

Haha, geez, we have so many resources I completely forgot that our own Disable Entry Creation perk can handle this!

After enabling “Disable entry creation” for a given form, you can enable conditional logic so that it only disables creation of the entry of certain conditions are met. This means the logic I suggested above would work and apply immediately upon submission.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.