WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
user ability to order database by X (5 posts)

  1. klikihak
    Member
    Posted 6 months ago #

    Hi, how can I make the ability for viewrs of the website to let them order database results posted in page with cfdb-database, by specific columns?

    I have lines like: Date, Name, Number and primary I have set order of results by date but I want the ability for users to change order by size of a number or by a name, when I hit the number, date, or name column on website, it only swaps the order upside down, and it´s not able to order it by highest number etc... How can i do it please?

    https://wordpress.org/plugins/contact-form-7-to-database-extension/

  2. klikihak
    Member
    Posted 5 months ago #

    How to make something like this please: http://s30.postimg.org/mizra7gf5/sort_by.png

    I need to sort cfdb-database...

  3. johnja1
    Member
    Posted 5 months ago #

    Hey Pete,

    Did you ever solve your problem? Can you please let me know. I have a real problem with the orderby shortcode. My field type is number since they are always numbers enter in the form. Unfortunately the orderby shortcode does not know it. So it sort things differntly. I issued a shortcode like this orderby="number-741 desc" but it sorted like below.
    600
    1000
    1200
    1300

    Actually it should have sorted like this
    1300
    1200
    1000
    600

    Not sure what is going on with the orderby shortcode

    Thanks
    Jacob

  4. klikihak
    Member
    Posted 5 months ago #

    I need just "eshop-like" "order by" settings for visitors of the website and nobody can´t helped me with that...

    I already have "show number of posts in form" drop-down menu, I already have "search form", (these two are by default in "cfdb-database") but now I need "order by" drop-down menu.

    Can anybody help me please?

    To johnja1:
    Try this:
    [cfdb-datatable form="YOURFORM" show="YOURFIELD" orderby="number-741 DESC, submit_time DESC"]

  5. johnja1
    Member
    Posted 4 months ago #

    Hey Pete,

    Why do we need to put submit_time DESC ?, I think this might not serve my purpose. I needed only to orderby descending by the one field "number-741".

    I read somewhere that CFDB treats every field like a text and will work accordingly. It is a real shame that the developers are not providing any assistance to solve this issue. I like this plugin a lot and want to make it work.

    Thanks Pete for your help
    Jacob

Reply

You must log in to post.

About this Plugin

About this Topic