Hi,
in a "custom code" in the "on submit"
<?php include('libraries/cegcore/my-dir/my-script.php'); ?>
generates warnings or error and doesn't load the php file
but in "on load" that's work well
do you have idea?
Hi Christophe,
You probably need to use a full URL, try adding a / at the beginning. Also see this FAQ https://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/4376-how-can-i-include-files-or-code-in-a-chronoform.html
Bob
Hi Bob and thanks to help me,
Le traitement se fait bien et très vite, en 1 seconde, puis page blanche!
Aucun echo dans mon code
C'est tout de même super étrange le fonctionnement de chronoform, parfois ça marche parfois ça bug sans qu'on sache pourquoi.
Lorsque j'inclue une fonction que cela soit en direct dans le code ou via un include et bein ça fait le traitement et tu sais pas pourquoi il part en vrille et t'affiche une page blanche. il est Cheulou ce composant
Hi Chris,
I don't see any obvious errors but there could easily be a misplaced quote. If you temporarily set your site Error Reporting to Maximum then you should see a PHP error message that will help the diagnosis.
Bob
I tried : nothing, it's like the content send to the template bug all; Like an exit in the code.
with in
error_reporting(E_ALL);
ini_set("display_errors", 1);
nothing
If i delete my php, it's ok, the message appears,
thanks Bob
I find something, chronoform doesn't like NOTICE and WARNING and crashes
for example
$form->data[toto] = "something"; produce a warning the var doesn't exist and cc crashes
if($n)... $n never defined produce a notice and cc crashes
now, with the log error file, i reduced all the warning and notice
always crash with nothing in the log error file, it's very difficult to work efficiency with chronoform
in fact chronoform doesn't like this in custom code in on submit
<?php
function myfct(){
}
?>
how can we do to use a function ?
Hi Christophe,
I have included all kinds of PHP in Custom Code actions in the On Load and On Submit events with no problems. I'm travelling this week and can't test on my iPad, I can double-check when I'm back at my desk next week.
Bob
Don't worry Bob,
I restart from scratch form and for the moment, it's well...
Thanks for your help
Good trip