• Resolved jflycn

    (@jflycn)


    After creating a data project, a very nice UI for editing rows can be accessed from the admin panel. However, when you click to edit each row, you are always lead to the same url (wp-admin/admin.php?page=wpda_wpdp_1_2&table_name=xxx) no matter which row you are editing.

    I am wondering if it is possible to access the editing UI from different urls for different rows (such as: wp-admin/admin.php?page=wpda_wpdp_1_2&table_name=xxx&row=123). These urls would be useful to be used in front-end to link to data editing in the back-end. Just like each post has a “Edit” link, it would be nice each row can have a “Edit” link in the front-end.

    • This topic was modified 5 years, 7 months ago by jflycn.
    • This topic was modified 5 years, 7 months ago by jflycn.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @jflycn,

    If you access url: wp-admin/admin.php?page=wpda_wpdp_1_2&table_name=xxx
    Do your rows have an edit link? If not, are you using a table or a view?

    Please be aware that you cannot edit rows of view.

    If you want to add row links like edit and delete, your table must have a primary or a unique key. Can you please check?

    Thanks,
    Peter

    Thread Starter jflycn

    (@jflycn)

    The url “wp-admin/admin.php?page=wpda_wpdp_1_2&table_name=xxx” leads to a UI with a list of rows, each has an edit link. If I click the edit link, it will lead to the editing UI for an individual row.

    What I am think of is skipping the list UI with an url (with an extra parameter) directly points to the editing UI.

    The table does have a primary key, but appending “&id=1” to the above url still leads to the list UI.

    Thanks!

    • This reply was modified 5 years, 7 months ago by jflycn.
    • This reply was modified 5 years, 7 months ago by jflycn.
    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Try to add &action=edit to your url. Does that work?

    Thanks,
    Peter

    Thread Starter jflycn

    (@jflycn)

    Yes. It worked! Thanks!

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Your welcome! 😊

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Link to editing individual row?’ is closed to new replies.