New at Joomla dev, writing a simple backend component where I have two date fields. One is a date the user can choose from a calendar popup (1st one below), the second is a date/time stamp that the user can't change but needs to see what that last timestamp was. In the edit form the first one (datepassed) is working and grabbing today's date. The second (timestamp) only works when the record is created and the time isn't being saved at all. I need it to always grab the present time and date.
From the XML file:
<field name="datepassed"
type="calendar"
label="Date Completed"
default="NOW"
/>
<field name="timestamp"
type="calendar"
label="Last Modified"
default="NOW"
readonly="true"
class="readonly"
/>
And in the edit.php view:
foreach ($this->form->getFieldset('fields_logged') as $field):
echo '<li>';
echo $field->label;
echo $field->input;
echo '</li>';
endforeach;
Found this link with a similar question, and this one from Joomla docs...not much help in the way of time though.
Any ideas why that timestamp isn't working, or is there a better way of doing this?
Thanks!