nliautaud / p01contact

Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
MIT License
16 stars 15 forks source link

Save forms to file instead of just email them #62

Open plirof opened 3 years ago

plirof commented 3 years ago

I have tried p01contact and it seems very poweful.

I'ts nice to post form entries to an email but It would be even better to be able to store entries to a file (eg a csv). This would help to make questionaires and be able to do a statistica analysis. Even just a simple log that could be parsed later could do the trick.

If you don't plan on implementing such a feature could you give any clues on where to modify the code to try and implement this;

Thanks

nliautaud commented 3 years ago

Hi, logs are currently stored for each request, in a log.json file. There is a corresponding parameter in the settings.

Feel free to describe an improved behaviour that you may think of.

plirof commented 3 years ago

Hello. Thanks , I didn't noticed that. I was thinking of 3 possible "solutions". The first 2 will need for me to make a parser but it's not a big problem.

  1. Store each form in different file
  2. (maybe the easiest)Keep them in one file but somehow add a tag to seperate different form data (I think the work-arround here could be to add a dummy field).
  3. Save them directly as csv (possibly different file per form). This was the way I exported data from Drupal webform.