Forums

Chronoforms 7 - Custom Html field - With php

mayergreenberg259 17 Nov, 2023
I am using chronoforms 7.
In the custom html field, I am trying to display html and php.
I have turned on the 'Run Php' setting under "Advanced Settings".
Yet, the php code doesn't run. Only the html code is displayed. The php code shows up commented out in the html.
How can I fix this.
Colnem 19 Nov, 2023
Hi

PHP Code in HTML Element works very well for me. .
Just use No Editor...
mayergreenberg259 21 Nov, 2023
It still doesn't work for me.
Here is my code:
<h2>hello 1</h2>
<?php
echo "hello 2";
?>
the html output is:
<h2>hello 1</h2>
<!--?php
echo "hello 2";
?-->
it doesn't run the php code. it just outputs it as commented out html.
I have the 'Run PHP' and 'Pure Code' settings enabled.
Does anyone have any ideas? Am I doing something wrong?

Thank you in advance for any help!
Max_admin 21 Nov, 2023
Answer
the commented code means that the editor was enabled when you entered it
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
mayergreenberg259 08 Dec, 2023
For anyone interested. I believe the actual answer was that I hadn't validated chronoforms yet on the domain I was using. The php would only work if it was validated.
You need to login to be able to post a reply.