• Howdy guys,

    my first plugin is underway, iv now researching how to go about;

    creating an editable table for the backend to record sets of options.
    the sets will be based around certain options for woo categories ie;

    TABLE PRESENTED TO USER IN plugin SETTINGS:

    CATOGARY……CUTOFF…… COLLETABLE… ETC….ADD-CAT-BUTTON
    ————————————————————-
    flowers…………3pm……….yes……………….EDIT-CAT-BUTTON
    hardware………..5pm………..no……………….EDIT-CAT-BUTTON

    this table will have a create/ADD button, from here it will collect values for wp options, maybe using a jquery popup box??

    im as far as looping through woo categories to create the KEY? then next collecting other values via a html form and then save these options to the wp options database that will be used on the front end woo categories, and this is working fine, but the next step is to then present these saved options to the admin/user via a html table, especially making it EDITABLE ROWS. iv seen some examples and they focus around jquery? but as im learning PHP with OPPS id prefer to keep it clean with mostly PHP, so my question is: is their proper structured was of approaching this via a html table that integrates with PHP and WP helpers without things getting messy.

    trawling the internet iv seen many approaches, iv now taken a step back and was wondering if their was an official guide or advice is welcomed.

    or at least the basic approach to follow would be fine….

    Many thanks in advance

    Simon

Viewing 2 replies - 1 through 2 (of 2 total)
  • It sounds like you are wanting to use PHP for something that the user is doing in the browser, which would imply Javascript. But you can have the Javascript talk to the PHP.

    The admin already contains PHP classes for the Post list tables. Many plugins extend that Post list class to edit other data.
    There are plugins that allow editing data inline also.

    Thread Starter Simon Barlcay

    (@primerepair)

    Thanks for your reply, yes i was reading about wp list tables, however it was recommended to avoid them for plugin development, however i think their may be a workaround to avoid a future wp update making them redundant, and that is to copy the actual file and include it within the plugin package…

    thanks again…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘adding an editable table to backend’ is closed to new replies.