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

PHP code not evaluating in ChronoForms text field values.

Overview

The issue occurred because PHP evaluation in text field values was a bug in CF 6.0.27/0.28 and is not a supported feature.
Replace the PHP code with the appropriate ChronoForms date shortcode to calculate and display the date correctly.

Answered
ChronoForms v6
sq 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
he 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}
This topic is locked and no more replies can be posted.