Php no longer working on custom form

The following code placed in the default.php file of a custom template provided two separate dates up until recently. Now it returns today's date in both instances.

<?php
$fromget = $this->groups['CRM']->elements['from_date']->element_raw;
$toget = $this->groups['CRM']->elements['to_date']->element_raw;
$from = JFactory::getDate($fromget)->format('m-d-Y');
$to = JFactory::getDate($toget)->format('m-d-Y');

?>
<table style="width:20%;line-height:25px;font-size:140%;">
<tr>
<td>Membership Start:</td>
<td><?php echo $from; ?></td>
</tr>
<tr>
<td>Membership End:</td>
<td><?php echo $to; ?></td>

</tr>
</table>

</body>
</html>


Fabrik 3.3.2
Joomla 3.4.4

Thanks.
 
what do you see if you echo out $toget and $fromget?
If they are correct, then you can deduce that the problem is in the date formatting, if they are incorrect (ie. today's date) then you know the problem is in the data itself
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top