Output and edit MySQL entries in the panel

Hello,

I need a cause for thought…
I want to create a subscriber-list (name, email, date_added, last_modified) and store it in a MySQL table.

How would you output that table to the panel with options to (add), edit and delete entries?
The table should not be accessible via the front-end.

Since I’m still new to kirby, I’m wondering, if a custom field is the right starting point.
Can the database-entries be converted to a structure field or does this require to additionally save the entries in a textfile?

Thank You!

Edit: I’m talking about … well I think not more than 500 subscribers… would it make sense to just store them in a text file? Is this safe enough?

I think the easier idea might be to make a page up to edit the data in the front end, rather then the panel, and you can protect that page from showing up to anyone who isnt currently logged in.

Try searching the forum, this question has come up a few times, but i’m sure the general answer is that it’s quite difficult to do this in the panel.

Regarding your edited question, if you use Uniform to drive your form, it can store the data in a log file for you, and its pretty easy to also get Uniform to store the form in a database.

I’m not sure if storing 500 entries in a Kirby content file is a problem or not, however your only saving a small amount of info so i think it would be ok. I have some really content heavy pages in some sites and it works just fine. It would be pretty easy to turn that content file into a CSV or whatever for use with things like MailChimp.

Thank You @jimbobrjames !
Yeah, I think I’ve already read every post regarding that topic (several plugins, uniform),
maybe that’s why I got stuck in the end… =)
Your front end solution sounds like a good suggestion.
I’m going to give this a try.
Again, thanks a lot!

If you want to go for a Panel solution, check out this plugin as a starting point: https://github.com/LCD344/Kirby-userManager-panel-extention

1 Like