Templates Plugins Courses

dataTables using Images and Actions

Greetings all,

i use dataTables to display row of orders i get from my form

i have been wondering to add few features to dataTables plugin,

  1. i want to display image that is in order database
    i dont know how to do that

  2. i want to add action buttons for exampe to change status of order or to delete it

how i should do that?

Hello, @nurzhan. Thanks for reaching out.

I’m afraid, the DataTable plugin does not allow to work with image elements, only text data. I have checked the adding of the simple image to the database table, HTML image, and BB-code image - the plugin supports only text elements. Apologies for the inconvenience :pray:

I suppose it is possible to add the action buttons to some specific row (plugin allows to use the “when the # row was clicked” action).

For example:

  1. create a table in database (data which you’re going to display in your datatable)
  2. add the workflow “when page is loaded”
  3. add the workflow “when table row A is clicked”
  4. create the popup, where your action buttons will be placed:
  5. add the action “show popup”:

Result: https://www.loom.com/share/3fbfcedc103f4d43aadbe7a47a34c1fa
You have to create the desired action buttons and workflows for them. And that’s it :slightly_smiling_face:

I hope this will be helpful :pray:
Regards,