I have a plugin that creates two pages in admin menu:
I'm regularly using add-edit-record to to create some sort of record and to put it in wp database. On the other hand page list-records lists all the records I already created plus allows me to delete record. I want to let add-edit-record also to load certain existing record from database and let me edit it (and save afterwards of course). But how can I call add-edit-record with information which record I want to open and work on?
My idea (maybe naive) is either save ID of edited record in some config option of wp-database and always check that item when opening add-edit-record page - which seems to me very complicated. Or call add-edit-record page with certain data as a parameter, like
but here I have no idea how can I obtain this parameter in my add-edit-record page.
Maybe I'm thinking in completle wrong direction so any advice would be appreciated. Thanks.