My orders keep coming back with the date field 12/31/1969. Any idea how to fix it?
Appnitro Software Forums » MachForm
[closed] Date field coming back 12/31/1969
(4 posts)-
Posted 4 years ago #
-
Hi Al,
Can you tell me which form? and which field?
Thanks
Posted 4 years ago # -
http://prayercardstore.com/machform/view.php?id=1
The fields for
1. Date of Birth
2. Date of Death
3. Date of Service
4. Deliver ON or Before...I had to change them to "single line text" momentarily because it is live and being used by customers.
I'll change it back for now so you can take a look.Posted 4 years ago # -
Ok, I found out that there is a bug for some system with PHP version < 5.
The date was limited to 12/31/1969 and can't be any older.To fix this, we need to modify 2 files (includes/helper-functions.php and manage_entries.php)
includes/helper-functions.php
-----------------------------on line 326, search for this code:
$email_data[$i]['value'] = ' - '.date("m/d/Y",strtotime($value));
replace it with:$exploded_value = array(); $exploded_value = explode("-",$value); $email_data[$i]['value'] = ' - '."{$exploded_value[1]}/{$exploded_value[2]}/{$exploded_value[0]}";on line 332, search this code:
$email_data[$i]['value'] = ' - '.date("d/m/Y",strtotime($value));
replace it with:$exploded_value = array(); $exploded_value = explode("-",$value); $email_data[$i]['value'] = ' - '."{$exploded_value[2]}/{$exploded_value[1]}/{$exploded_value[0]}";manage_entries.php
------------------on line 251 and line 260, search for this code:
$form_data[$i][$j] = date("Y/m/d",strtotime($row[$column_name]));
replace it with:$exploded_value = array(); $exploded_value = explode("-",$row[$column_name]); $form_data[$i][$j] = "{$exploded_value[0]}/{$exploded_value[1]}/{$exploded_value[2]}";
I hope I'm being clear for you.
Let me know if you have any difficulty.Posted 4 years ago #
Topic Closed
This topic has been closed to new replies.