Hi Bob,
I have backup and restore a forms in CV5 from a older site to the new site.
In the older site all is good, in the new site the event switcher on a submit check don't fail and go on.
I set a field box called "code", and in the event switcher (on fail I set an event loop with load option) I check this code in this way:[code]<?php
if ($form->data[code] == prova1234) {
}
else if ($form->data[code] == prova5678) {
}
else if ($form->data
In the new site, if I write random digit, the form go on without error.
There is a problem with backup and restore?
Thanks, saddys
I have backup and restore a forms in CV5 from a older site to the new site.
In the older site all is good, in the new site the event switcher on a submit check don't fail and go on.
I set a field box called "code", and in the event switcher (on fail I set an event loop with load option) I check this code in this way:[code]<?php
if ($form->data[code] == prova1234) {
}
else if ($form->data[code] == prova5678) {
}
else if ($form->data
== prova5555) {
}
else {
$form->errors[] = "Il codice è errato o inesistente!";
return "fail";
}
?>
Now, in the older site when I write in the form a different code, i get the error when click on submit.
In the new site, if I write random digit, the form go on without error.
There is a problem with backup and restore?
Thanks, saddys
Hello saddys,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Event switcher
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Event switcher
P.S: I'm just an automated service😉
I have tried to create a new form in the new site with copy&paste custom code, and now the switcher is OK, but why there is a problem with the same code in a restored form?
News:
if I create a new form in the new site, all is ok with this code too (like in the older site): [code]if ($form->data
in the restored forms, all seem ok ONLY with this:
ok, but... why??
if I create a new form in the new site, all is ok with this code too (like in the older site): [code]if ($form->data
== prova1234) { .......... return "fail";
in the restored forms, all seem ok ONLY with this:
if ($form->data[]'code'] == 'prova1234') { .......... return 'fail';
ok, but... why??
HI saddys,
The second version with the quotes is valid PHP, the first version isn't.
Bob
The second version with the quotes is valid PHP, the first version isn't.
Bob
Ok, but in a new form and in the older site the first version is ok! mystery🙂
Hi saddys,
Possibly the older site had Magic Quotes enabled (they are now deprecated) and so magically fixed the bad PHP for you.
Bob
Possibly the older site had Magic Quotes enabled (they are now deprecated) and so magically fixed the bad PHP for you.
Bob
Hi,
There is some info on this here:
http://stackoverflow.com/questions/2405482/is-it-okay-to-use-arraykey-in-php
Best regards,
Max
There is some info on this here:
http://stackoverflow.com/questions/2405482/is-it-okay-to-use-arraykey-in-php
Best regards,
Max
This topic is locked and no more replies can be posted.