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

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 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.
You need to login to be able to post a reply.

VPS & Email Hosting 20% discount
hostinger