How to Check if user has already submitted form?


I'm using the Form block object and I'd like to be able to check if the user has already completed the form. I've been scratching my head for a while and can't really come up with an easy solution to this problem.

The user will not be logged in (actually I'm showing the form in an Iframe on Facebook) - so I need to either do a session check and then somehow disable the form (I already have a custom template in place, so I could potentially do it there) OR I would grab the users facebook ID and compare it to what is saved in Reports from my form. Problem is, I can't seem to figure out how to access submitted form data from PHP.

Any suggesions or thoughts out there? I'd like to avoid using sessions as they are a PITA when it comes to C5 in my experience.

Thank you for your eyeballs and brainpower :)


View Replies: View Best Answer
jrlas replied on at Permalink Reply 1 Attachment
Hi, see attachment, maybe this will help you
Hammertime replied on at Permalink Reply
Hmm.... I'll give you an A for effort, that's for sure.
12345j replied on at Permalink Best Answer Reply
the form dat is stored in the btFormAnswers table. The general way that I would go about it is to make another column their that stores the facebook id. On the form have a hidden field that stores this id. Then save that data into the db, and in the forms view check if the users facebook id exists in the database already.
Hammertime replied on at Permalink Reply
I was hoping I wouldn't have to do all that work... But *sigh* all hands to the pumps, gentlemen!

Thanks :)