get("ventas.fecha");return $fecha;?>"> How to implement php functions on CF7 - Forums

Forums

How to implement php functions on CF7

teldrive 08 Sep, 2020
i am trying to migrate date format php_function from ccv6 to cf7
setlocale(LC_TIME, 'es_ES.UTF-8');
$fecha = $this->get('ventas_list.row.venta.fecha');
echo strftime("%d %b %y", strtotime($fecha));
but in cf7 i try to use html_custom with php code without success
<?php
$fecha=$this->get("ventas.fecha");
return $fecha;
?>
Max_admin 08 Sep, 2020
Enable the "Run PHP" behavior in the HTML view!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Max_admin 08 Sep, 2020
Answer
it's in the advanced settings!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
healyhatman 10 Sep, 2020
Do the {date:} shortcodes not work in CF7?
teldrive 10 Sep, 2020
Hi the issue is when you need write month abreviation instead of number, I think date doesn't support it
Max_admin 11 Sep, 2020
it should support any date format string!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
teldrive 11 Sep, 2020
both of you are right, this works also, I thought that I needed first use "strtotime" function first but is not necessary
venta.fecha:<b style='color:SlateBlue;'>{date:y-M-d$(var:ventas_list.row.venta.fecha)}</b>
This topic is locked and no more replies can be posted.