Event -> View -> Content

salvok5 04 Feb, 2017
I put this code to format a date but does not work.
<?php
echo date('d-m-Y',strtotime($this->get("richiama_atto.docu.DECORRENZA")));
?>

I did not understand what I can put on the event content.
I can put php code <?php .... ?>
if the php code how do I retrieve a field from the table?
In addition the conditions "if else" type work on the content?
Max_admin 04 Feb, 2017
Answer
1 Likes
Hi Salvo,

You can NOT use PHP code in the event, only HTML and Connectivity syntax code, you can use php code in the "HTML" view, or a PHP function, and in PHP function you should not use the PHP tags.

So you just create a php function, and call it after the "richiama_atto" function and then use your code without tags:
echo date('d-m-Y',strtotime($this->get("richiama_atto.docu.DECORRENZA")));


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.