Contact Form DB – Save/Not Save data based on Session Parm
-
I have a requirement to only allow 1 entry by the same person every 24 hours into a sweepstakes. I have updated the WR ContactForm existing validation that checks for duplicates (in /wr-contactform/libraries/gadget/contactform-frontend.php) to qry the CFDB table for an existing entry WITHIN 24 HOURS (based on email addr) and set a Session parm. I then display the correct page (thank you or error) upon submission – this is all fine. Of course the data is already saved at this point.
I do not want to save the form data on error in the CFDB table. Where is the best place to insert code that first checks the Session parm BEFORE the data gets saved? Also, if some form fields/records get written BEFORE this email validation will I run into a problem on the data export with the GROUP BY methods that display the data (a single “record” of data actually being a grouped set of records in the DB)?
Thank youhttps://www.ads-software.com/plugins/contact-form-7-to-database-extension/
- The topic ‘Contact Form DB – Save/Not Save data based on Session Parm’ is closed to new replies.