Okay
  Public Ticket #2899288
creating a form in wpDataTables using php
Closed

Comments

  • Darryl Kissinger started the conversation

    What is the correct way to add a form to a wpDataTables table that is populated by passing it a serialized PHP array?

    The PHP array may contain one row of data or a hundred or more.  The purpose of the form is to allow the user to select one of the rows (which identify an account).

    Using a hook in PHP, I add a column to the array to hold the radio button html. Then wpDataTables displays the radio button correctly as column 1 of the form.

    I also add the <form> tag in a shortcode above the table and the <input type="submit"> button and </form> tag in a shortcode below the table.

    The page seems to display properly and a look at the source code on the browser shows all elements in place.  However, when the submit button is pressed, the selected radio button value is not available in the routine servicing the form.

    I'm relatively new to using WordPress and PHP, so it's possible I'm not retrieving the value correctly.  However, when I do not use wpDataTables and simply create the whole form in a shortcode, I am able to get the value and process correctly.  I'm using $_GET.  This makes me think there's something different going on when wpDataTables is involved.

    Any help would be appreciated!

    Darryl

  • [deleted] replied

    Hi Darryl

    This related to the previous ticket I replied to, correct?

    Basically there is no way to achieve this using the plugin's builtin features, but we can recommend this service for customization:

    https://wpkraken.io/?tms-plugins

    They do develop such solutions, so can you please send your inquiry to them?