Buy Now
Sign in

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

squiffed , April 08 2019, 23:38
S
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
 1
 Answer
It's not supposed to work, it was a bug.
Just use a date shortcode
{date:mdi}
and
{date:d-F-Y$+56 days}
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
squiffed 15
April 09 2019, 12:54 #385776
Great. Appreciate the answer.