Buy Now
Sign in

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

squiffed , April 08 2019, 23:38
squiffed 15
April 08 2019, 23:38 #385763
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 7
April 09 2019, 01:56 #385764
It's not supposed to work, it was a bug.
Just use a date shortcode
{date:d-F-Y$+56 days}
Web developer at - I DO NOT work for ChronoEngine!
Professional Work:
Custom CF / CC Plugins and Extensions:
squiffed 15
April 09 2019, 12:54 #385776
Great. Appreciate the answer.