How to get a Var only output in a php code CF8

prevent PHP code from displaying output onscreen in ChronoForms.

Overview

The issue occurs when using echo statements in custom PHP code, which causes results to be displayed directly.
Instead of using echo, return the value from your PHP code and reference it using the designated variable placeholder or method.

Answered
ChronoForms v8
Ro Ron 15 Sep, 2024

Hello

I used to use custom code in SF6 and get a var-only output. But I don't know how to get a var-only output in PHP code in CF8. The result of the PHP code is displayed onscreen.

Is there a way out?

Thanks

Ron

Max_admin Max_admin 18 Sep, 2024
Answer

do not use "echo", just return whatever value in your PHP code and use {var:php_name} or $this->get("php_name") in another PHP code

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.