• Resolved mhaslamTech

    (@mhaslamtech)


    I’ve been looking at this thread:(https://wordpress.org/support/topic/how-to-expand-tablepress-row?replies=24#post-4187213) trying to achieve what I want but I can’t seem to.

    I have a table listing equipment with the following columns:
    Item:_______________Quantity:______Price/Day:______Price/Week:
    speakers_______________2______________£10______________£30
    mixer__________________1______________£30______________£90
    microphone package_____1______________£30______________£90
    cables________________etc_____________etc______________etc

    I want to have the ‘microphone package’ row to expand to reveal the separate list of individual microphones and a breakdown of their prices in the same format as the rest of the table.

    Is this achievable and how could I go about doing this, with an extension or otherwise?

    Many thanks,
    Matt 🙂

    https://wordpress.org/plugins/tablepress/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You could maybe try the TablePress Extension that is discussed in this thread: https://wordpress.org/support/topic/how-to-expand-tablepress-row?replies=24

    Regards,
    Tobias

    Thread Starter mhaslamTech

    (@mhaslamtech)

    That’s the thread that I was looking at before my previous post.

    I tried using that extension but it added an extension to all rows of the table and didn’t expand the table in the same format. Another way would be if I could display a table within a table?

    If the plugin/thread you suggested can work how I need it to, how could I adjust the shortcodes etc to achieve this?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, my bad. I didn’t notice that you had already found this.

    If you add another table as the content that is to be displayed, this should work, but it might take some extra customization and other custom code. There’s no directly usable solution for your idea, I’m afraid.

    Regards,
    Tobias

    Thread Starter mhaslamTech

    (@mhaslamtech)

    so could this code from the extension be altered to display the contents of a second table?

    [table id=1 datatables_row_details=true datatables_row_details_columns=”A” /]

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    not directly. Instead, you’d simply have to add the Shortcode that displays the second table into the cell that is used for the details that are shown when the “+” button is clicked.

    Regards,
    Tobias

    Thread Starter mhaslamTech

    (@mhaslamtech)

    ok that makes sense but how would I actually get the + to appear and actually display the second table?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I suggest to first try with regular table content, i.e, try to follow the outline in that link. Once you can show such content, it should be sufficient to add the table Shortcode into that cell.

    Regards,
    Tobias

    Thread Starter mhaslamTech

    (@mhaslamtech)

    ok thanks i’ll try that and let you know how I get on.

    How would I modify this code so that I only get the + expansion icon on one row rather than every row in the whole table?

    [table id=1 datatables_row_details=true datatables_row_details_columns=”A” /]

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I’m afraid that that’s not really possible. You will always have the “+” icon on all rows. We can however use some CSS code to hide it on all rows where you don’t want this.

    Let’s do that when they are working.

    Regards,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Expand table to reveal hidden rows’ is closed to new replies.