Example to use function in CC5

How to insert a PHP function in a column in ChronoForms 5.

Overview

The issue is not understanding the syntax for defining a custom function within a column's field.
Define the function directly in the field using the format 'field:return $cell;' or with a simple operation like 'field:return trim($cell);', where $cell represents the current field value.

Answered
we webcrea 26 Jun, 2017
Hi,

I don't understand how to insert a php function in column in CC5

Multi line list of fields with function definition, the definition string is passed to a create_function function which accepts 2 params, $cell for current field value and $row for current row data,
e.g:Model.field:return $cell;

could you show me an example

thanks
Max_admin Max_admin 27 Jun, 2017
Answer
Hi Christophe,

Field:return $cell;

or

field:return trim($cell);

This is very limited compared to v6

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.