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 Format Bug!


  1. cybermatic
    Member

    First of all, I love MachForm! It is without a doubt the best way to visually design and manage forms online - brilliant product.

    Second of all, I think I found a small bug.

    I've searched the forum and no one else seems to be having/noticed this problem yet. I've discovered that when you change the date format from MM-DD-YYYY to DD-MM-YYYY, you can no longer click on the little calendar icon and select the date visually - you have to manually type it in.

    The reason for this I believe is that when you change the date format, for some reason the calendar.js file is removed from the forms source code?!?! If you leave the date format as default (MM-DD-YYYY) the calendar.js file appears in the forms source code as is should.

    Can anyone else replicate this issue?

    Thanks! :)

    Posted 16 years ago #
  2. yuniar

    Ohh.. you are right, this is a bug.

    Here's how to fix it. Edit your includes/view-functions.php file, search around line 1694, you'll find this code:

    if($row['element_type'] == 'date'){
    	$has_calendar = true;
    }


    replace it with this one:

    if($row['element_type'] == 'date' || $row['element_type'] == 'europe_date'){
    	$has_calendar = true;
    }


    that should fix it. thanks for the report! I'll patch machform package.


    MachForm Founder

    Posted 16 years ago #
  3. cybermatic
    Member

    yuniar, thanks a lot for quick response.

    This fixes the problem when embedding the form using the Standard Form Code and Simple Link but when using the Advanced Form Code, the same problem still exists.

    Cheers! :)

    Posted 16 years ago #
  4. yuniar

    oops..there is another line to fix for Advanced Form Code.
    Search for that code again around line 2031.


    MachForm Founder

    Posted 16 years ago #
  5. cybermatic
    Member

    Excellent work! Now working perfectly. Thank you very much! :)

    Posted 16 years ago #

RSS feed for this topic

Reply