User enters info, schedule excel email to myself


SHORT: I need to have users enter their last name, and last 4 of ssn before navigating away from my site. I would then like that info to be emailed to me once a week automatically.

LONG: I have a lead generation site and need to collect some info from the user. I’m going to cross reference the info with Google Analytics, and even our personal records. I have formit installed so many there’s a way to have that automatically email me once a week with the results? If not I am open to other ideas, maybe even using cPanel.

Whatever is easiest and I can set a schedule to, preferably export as excel file. Thank you in advance

[Off-topic, is it even allowed to ask for SSNs?]

What you need is a cron job to trigger a custom script weekly (optionally augmented with something like Scheduler, but that has little added value for a single type of task executed at a fixed schedule).

If you use formits save form functionality, you can read from the formit database tables for form submissions that week, and then parse that into a CSV (easiest, openable in Excel) or a xlsx file (more work, look at phpspreadsheet library) that you then send to yourself.

It seems like a rather specific use case but who knows somebody else might have some example code for you. Shouldn’t be the most complicated script, though.

Some links to get you started:

Thank you for yoru input, I’ll have to continue working on this. I just wanted to update and say that I found the FormSave extra and it was a breeze to install and get working. I can now see the forms saved in the backend and ways to export it, but no scheduling yet. That’ll be next after a few other things.

Thank you, I do web development almost part time at my job in between other things

oh yeah, about the SSN… I just need the last 4. They’re going to enter much more sensitive information afterward on a different site, this is just helping me confirm that my site did the lead generation