• Resolved cetacousin

    (@cetacousin)


    Hi,

    I have a question and have no idea if A. it is possible and B. how to even begin doing it!

    Instead of having the pdb-single as a table of FIELD – DATA, having it as
    FIELD
    DATA
    so the data is under the field name?

    Also, I am still trying to work out how to add a simple sortable tool to the main pdb-list table ? something similar in https://www.datatables.net (Multi-column ordering)

    Any help would be appreciated – I am still learning loads!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author xnau webdesign

    (@xnau)

    For the single record shortcode, you can use a rule like this in the custom CSS setting:

    .pdb-single dt {
        float: none;
    }

    You may need to add additional rules to get it looking the way you want.

    For sorting the list, it is possible to set up a multi-column sort like that using javascript. If you create a custom template for the list shortcode, you can include the javascript in the template.

    Here is a simple jQuery script that should work for this: sorttable.js

    Thread Starter cetacousin

    (@cetacousin)

    HI

    Thanks for your reply. Sorted the table layout but cannot get my head round how to add the javascript; the tutorial is not making any sense for me ?? no idea where the code needs to go!

    Plugin Author xnau webdesign

    (@xnau)

    I’m sorry…I have to leave that to you, I’m not familiar with the details of using the code I gave you a link to, that was only meant as an example of the kind of script you’re looking for.

    The Javascript will go in the custom template, but it will be up to you to configure it.

    Thread Starter cetacousin

    (@cetacousin)

    Hi! after a good night sleep I have worked it out (finally!)

    (reference to other people wanting this)
    I used the plug in Table Sorter by Farhan Noor

    Went into plugin editor > participant database > templates > both pdb-list php files, found <table and replaced the default to
    <table class=”wp-list-table widefat fixed pages list-container tablesorter {sortlist: [[2,0]]}” id=”myTable”>

    and it works! https://www.bitsyboos.co.uk/the-database

    Hope this helps others

    Plugin Author xnau webdesign

    (@xnau)

    OK, that’s good, but I suggest you put your custom templates into a safe location because a plugin update will overwrite your changes to the plugin files.

    This is explained here: Using Participants Database Custom Templates

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Table Layout & Sorting’ is closed to new replies.