Forums

CF 6.0.28 (and 27) - php not being evaluated in textfield's 'Value'

squiffed 08 Apr, 2019
Recently updated various parts of Joomla install, including CF 6 to 0.27 and then 0.28. I find that a text_field where I want php to calculate a date isn't working. It just shows up as the php itself instead of evaluating. It used to work fine. If I use custom HTML to evaluate same php string, it works. I have 2 fields that use php date and neither is now working.

One is very simple:

<?php echo date("mdi")?>

Other is also pretty simple:

<?php $date=date_create();
date_add($date,date_interval_create_from_date_string("56 days"));
echo date_format($date,"d-F-Y"); ?>

php is at 7.2.16
healyhatman 09 Apr, 2019
Answer
1 Likes
It's not supposed to work, it was a bug.

Just use a date shortcode
{date:mdi}
and
{date:d-F-Y$+56 days}
squiffed 09 Apr, 2019
Great. Appreciate the answer.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger