This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Date Fields Auto-Populating
Started 15 years ago by rx2 | 4 posts |
-
We have a form with a set of 3 appointment areas, 2 of which are admin only. Within each area we have a date field (for the appointment date) as well as two time fields, one for the start time, one for the end time.
When we edit this form, the date fields in these admin only areas are always automatically populated with 12/31/1969 for the start date and 12:00am for the time fields, even though we haven't edited them ourselves.
We only need these to be populated once we've changed them ourselves.
Posted 15 years ago # -
What is your server operating system? Linux or Windows?
MachForm Founder
Posted 15 years ago # -
Hello.
Linux (CentOS 5), running MySQL 5.0.67-community with PHP 5.25.
Posted 15 years ago # -
Thanks for the info.
This is apparently a bug with some of the code which display those date/time.To fix it, you need to modify includes/entry-functions.php file.
1) Line 76:
if(!empty($entry_data['element_'.$element_id])){
change it to become:
if(!empty($entry_data['element_'.$element_id]) && ($entry_data['element_'.$element_id] != '00:00:00')){
2) Line 109 & 122:
if(!empty($entry_data['element_'.$element_id])){
change it to become:
if(!empty($entry_data['element_'.$element_id]) && ($entry_data['element_'.$element_id] != '0000-00-00')){
3) Line 297:
if(!empty($entry_data['element_'.$element_id])){
change to become:
if(!empty($entry_data['element_'.$element_id]) && ($entry_data['element_'.$element_id] != '00:00:00')){
4) Line 334 & 342:
if(!empty($entry_data['element_'.$element_id])){
change it to become:
if(!empty($entry_data['element_'.$element_id]) && ($entry_data['element_'.$element_id] != '0000-00-00')){
If you are having difficulty, please mail to: customer.service [at] appnitro.com
I'll send you the file.MachForm Founder
Posted 15 years ago #
Reply
You must log in to post.