I would like to have a way someone can check a list of emails from the front end to see if any are not found in the database. Not really sure if or how this could be done. The list would come from a csv file and have anywhere from 20 to 120 emails in it. I need some ideas on where to start.
I think I can figure out the sql query part but don't know how a list can be inputted so a query can be run on it, and results can be returned. Might it work to copy and paste in the list of emails into a form paragraph or rich text box? Or upload a text or csv file? Then what?
-Jane
What you want to do requires a custom solution. Neither WordPress nor Formidable has the functionality to to what you want out of the box. You could use a Formidable upload field to upload the CSV file, then process it in a Formidable hook or with Ajax. Either way can return a result. The SQL and list processing is all custom.
Thanks Victor. I figured that much. Do you have any examples using the hook needed to get me started? I think I can figure out how to parse the file and query the database for each email in it but don't know how to access it.
You might be best off using one of the hooks that fire either before or after entry creation. You can possible also trigger a result with the Ajax.complete() event from the upload. I haven't researched this, but the kind of custom code you need to write may not be able to use any available WordPress or Formidable functions. Formidable has functions for CSVs but I'm not sure how helpful they'll be. You may have to resort to PHP low-level file handing functions to open, parse, and process your email addresses. You're breaking new ground.
I figured out a solution to this. I created a form that has two paragraph fields in it and wrote a php script that uses the 'frm_pre_create_entry' filter.
^^ -Jane
Please login or Register to submit your answer