Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3422 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

My question may be as simple as how do I enter a date in DD/MM/YYYY format using a radio button?  (If you can answer that, ignore the rest).

I have a simple form for online Timesheets that we have been using for years (thousands have been entered without almost no work on my part since I set it up).  Now we want to change the date format from MM/DD/YYYY to DD/YY/YYYY.  Everything works except where I auto-enter the "Period Ending" Date.

An assistant updates the global value for the "Period Ending" Date  in FileMaker every two weeks- this date needs to be auto-entered in new Timesheets (but must be modifiable by workers).  Since addrecord.php is creating a new record I use a valuelist that finds that date [a related, global value] in a global table that consists of one record with various global values for the Timesheets table. 

<?php $fieldValue =   "test " .       $record->getField('Period Ending', 0) ; ?> <?php getInputChoices("radiobutton", $layout->getValueListTwoFields('Timesheet Period Ending Date', (isset($master_record)) ? $master_record->getRecordId() : $record->getRecordId()), $fieldValue, getFieldFormName('Period Ending', 0, $record, true, 'RADIOBUTTONS', 'text'), 'text', $submitDateOrder);?> is the ending date for the Current Pay Period.

this appears as 

2-Week Period Ending (MM/DD/YYYY):  [Entry field with 07/04/2015 autoentered]07/04/2015 is the ending date for the Current Pay Period.

And really works well (don't ask me about 'test ', it is ignored).  To change the date format I tried doing a calculation [Day ( timesheets Period Ending global ) & "/" & Month ( timesheets Period Ending global ) & "/" & Year ( timesheets Period Ending global )] to change the order but it submits it in the MM/DD/YYYY format (other date fields ARE dealt with properly!!!).

 <?php $fieldValue =   $record->getField('Period Ending', 0) ; ?> <?php getInputChoices("radiobutton", $layout->getValueListTwoFields('Timesheet Period Ending Date calc', (isset($master_record)) ? $master_record->getRecordId() : $record->getRecordId()), $fieldValue, getFieldFormName('Period Ending', 0, $record, true, 'RADIOBUTTONS', 'text'), 'text', $submitDateOrder);?> is the ending date for the Current Pay Period.
2-Week Period Ending (DD/MM/YYYY):  [Entry field with 04/07/2015 autoentered]04/07/2015 is the ending date for the Current Pay Period.

This is entered as April, while in the other date fields in the same form 04/07/2015 is entered as July.

I am doing this with Filemaker Server 11, using PHP/Apache on a mac mini client.

Edited by Dave Carmean
Entry field box with auto-entered date was not visible

This topic is 3422 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.