FIlter

Permalink Browser Info Environment
In one of my forms I have a date picker field. In my data display list I am trying to Filter >> Sort my list by the date but I can't get it to sort the dates correctly. Am I needing to format that date view in the Form Field (in Advanced Forms) in a certain PHP format for this to appear correctly? At kind of a lose for this. Also is there a way to have empty fields appear last and the closest date at the top. Basically it is for our sales to have a way to input leads and be able to have a date when they need to contact them and the closest date located at the top. Thanks for the help and Merry Christmas.

Andy P.

Type: Discussion
Status: In Progress
apage50
View Replies:
apage50 replied on at Permalink Reply
apage50
I forgot to include that it is filtering but it shows February then January then March. I need it to sort at January = 01, February = 02, March = 03 and so on. Thanks and hope to hear from someone soon.
ProjbyP replied on at Permalink Reply
ProjbyP
Your input dates need to be set as 2015-05-05, when adding to the form.
Then in the template set the date format however you wish it to be - 2 examples:

<field name="Date of Death" format="m/d/Y" />
<field name="Date of Death" format="F j, Y"/>


I can't recall the output, I think the first one displays as 5/5/2015 and the other maybe May 5, 2015. There's a link to date formatting in the form field.
ProjbyP replied on at Permalink Reply
ProjbyP
The dates in this addon are text fields, rather than date fields, thus the need for the proper date input.

concrete5 Environment Information

# concrete5 Version
5.6.0.2

# concrete5 Packages
Advanced Forms (1.10), Amiant CSS3 Menu (0.3), Data Display (2.5.2), Disqus Comments (0.5), Login (1.1), Popup Login (1.0.5), Print my page (1.0.3), Pro Blog (9.5.0), RonyD P.O. Management (1.0), Trans Marine Save Area To Pdf (0.9.7).

# concrete5 Overrides
helpers/concrete, css/jquery.vticker.js, css/broad.css, css/jquery.zrssfeed.min.js, css/print.css, css/main.css, css/ticker.css, single_pages/user_error.php, single_pages/maintenance_mode.php, single_pages/page_not_found.php, single_pages/profile, single_pages/upgrade.php, single_pages/pb_sort.php, single_pages/members.php, single_pages/download_file.php, single_pages/login.php, single_pages/page_forbidden.php, single_pages/register.php, single_pages/pb_post.php, single_pages/install.php, themes/teamusav, themes/no_theme

# Server Software
Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

# Server API
cgi-fcgi

# PHP Version
5.4.20

# PHP Extensions
bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, filter, ftp, gd, hash, iconv, imap, json, libxml, mbstring, mysql, openssl, pcre, Phar, posix, Reflection, session, SimpleXML, sockets, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib.

# PHP Settings
max_execution_time - 120
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 120
max_input_vars - 1000
memory_limit - 64M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 150M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.