• Seems so simple, searching for hours not finding how to list all data in reverse chronological order, most recent first. Tried orderby=”Submitted DESC” then switched to ASC in case I misunderstood but neither changes the order displayed. Tried using submit_time “which contains the submit time-stamp in the form of seconds since 1970 with miliseconds” for ASC and DESC but no effect on order of data. These are default required fields on every form. Yes, can click Submitted column heading to reverse data order but need it to show correct on first load, as eventually there will be lots of data to aggravatingly re-sort every visit. What am I missing?
    Thank you!

    https://ww.wp.xz.cn/plugins/contact-form-7-to-database-extension/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Post the shortcode you are trying.

    Thread Starter wilderbee

    (@wilderbee)

    Further testing today isolated the offending phrase, it is the one that adds the scrollbar — which I was thrilled to discover as scrollbar is essential.
    ”’dt_options=”bJQueryUI:true, sScrollX:’100%’, bScrollCollapse:true” ”’
    So I believe the question has evolved to how to get a scrollbar that does not disable the sort order?
    Many thanks! Code below:

    ”'[cfdb-datatable form=”myform2″ dt_options=”bJQueryUI:true, sScrollX:’100%’, bScrollCollapse:true” id=”myid” style=”#myid td { font-size: 140%; }” show=”Submitted,date_time,Last-Name,First-M,Company,Address,City,State,Zip,Phone,from_email,akismet,Submitted Login,ip_address,email_to,name_to” headers=”email_to=Record Emailed To,name_to=Staff Name,ip_address=IP Address,Submitted Login=Login ID,date_time=Date Declared,akismet=Akismet” orderby=”Submitted DESC” ]”’

    Plugin Author Michael Simpson

    (@msimpson)

    See if this helps:

    dt_options="bJQueryUI:true, sScrollX:'100%', bScrollCollapse:true, 'aaSorting': []"

    Thread Starter wilderbee

    (@wilderbee)

    Unfortunately no. Receive data order desired but lose the shading for alternate rows. At end of data instead of a scrollbar it displays the code following the ‘aaSorting’:[] as if the code broke there? Have searched the aaSorting term and syntax appears to be correct. If I move it to another location in the dt_options string (with separating comma) then the code breaks at that new location. I do not know dt_options, had picked the phrase from CFDB documentation, your help very much appreciated!

    In case it could make a difference in Submitted date formats, data source is “Fast Secure Contact Form” not “Contact Form 7”.

    Plugin Author Michael Simpson

    (@msimpson)

    It seems to work OK for me. But WP might not be able to properly parse it when the “[]” characters inside a shortcode. It may thing the ] is ending the shortcode.

    You might want to look at http://datatables.net for more info on datatable options.

    Thread Starter wilderbee

    (@wilderbee)

    Okay, thank you, I will follow up on that. Will post again if I get a solution. There is time before the amount of data catches up to critical for the reverse chron — going with the scrollbar which is more important for now.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘reverse chron order, sort by date time’ is closed to new replies.