Saving form input

Hello.

I am a total newbie to web development and kirby and I am currently trying to build a site for a school friends association.

There is going to be a form where people can enter their name, email and how much money they want to provide to the school per year and if they up for the emailnewsletter.
I want to save the entries somehow.

What would be best practice to do that ?
I managed to save the data to a csv, but I am wondering if there is a better, safer and more elegant way?

Thanks for any suggestions,
Oliver

Hey @OPopp,
when I get you right you just want to know a better/safer/more elegant way to store the data provided by your form?

It really depends on what you want to do with the stored data. If you just want to save it - CSV is fine I guess.

If you want to work with the data later on I would think about storing the data in a json-file and give every data an id of e.g. a timestamp. So you can easy work with it in each language (js, php) and you dont have to create arrays from csv files later or so.

1 Like

Hey @habundloot,
thanks a lot for the input. I really appreciate it!
Not yet shure what I am going to do with the data, but I will figure out soon.
Thanks and Cheers,

If you expect a lot of data, I’d go for subpages or an SQLite database instead of saving into a single file.

1 Like

@texnixe Great thanks for the input. I will consider it and good to know the next better solution. Thanks!