Good evening to all and best wishes.
I'm working with ChronoForms5 and ChronoConnectivity5 and I can not solve a problem (maybe it will be stupid and I do not even see it). With a form, customers send me data. Besides their address they can send me another address for shipping. With the conditional system you open the "shipping address" form, if the customer selects "No" ok, in case of "Si" the mask does not open. (
So far everything is ok. The form arrives via email quietly and works well. Now I've connected ChronoConnectivity5 and I'm compiling the code to "edit" the data.
In "Admin List" / "Actions" / "Edit" ----
Code I entered the following:
Where am I wrong?
Thank you.
I'm working with ChronoForms5 and ChronoConnectivity5 and I can not solve a problem (maybe it will be stupid and I do not even see it). With a form, customers send me data. Besides their address they can send me another address for shipping. With the conditional system you open the "shipping address" form, if the customer selects "No" ok, in case of "Si" the mask does not open. (
So far everything is ok. The form arrives via email quietly and works well. Now I've connected ChronoConnectivity5 and I'm compiling the code to "edit" the data.
In "Admin List" / "Actions" / "Edit" ----
Code I entered the following:
But by checking the conditional does not work.
<?php if ($form->data['spedizione'] == "Si"): ?><table width="80%" border="1" style="border-collapse: collapse;"><tr><td colspan="2" align="center"><b><font style="color:red;">L'indirizzo di spedizione è lo stesso</font></b></td></tr></table><?php else: ?><table width="80%" border="1" style="border-collapse: collapse;"><tr><td colspan="2" align="center"><b><font style="color:red;">L'indirizzo di spedizione è:</font></b></td></tr><tr><td><b>Nome e Cognome:</b> {nomesp} {cognomesp}</td><td><b>Ind.:</b> {indirizzosp}, {civicosp}</td></tr>....</table><?php endif ?>
Where am I wrong?
Thank you.
If you're creating from scratch, do it in v6
the trouble is that I have the form in CF5. transferring them to CF5 is a big job ...
can I use CCv6 with CF5?
can I use CCv6 with CF5?
unless you need to have the CC connection INSIDE the form, there's no reason you can't use CCv6 to get the data saved to the database by a CFv5 form.
OK thank you.
With CCv6 I can perform the operation conditional that in CCv5 drives me crazy?
With CCv6 I can perform the operation conditional that in CCv5 drives me crazy?
You can do whatever you want. What exactly is it you're trying to do?
in the Admin List / Action / Edit, I report the data of a form. The problem arises when I try to make the shipment address data visible / invisible. That is, if the customer answers "Yes" it means that the address already written in his data is the same to be used for shipping. If you answer "No" the data of the new address should appear. Using the PHP reported in the 1st post I can not get anything.
Oh yeah that would be easy to do
The data Yes / No is present, when I insert the input field to be modified, it appears
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />
Never used CCv5 it can probably be done but I can't help you with it
In CCv there are few tutorials and for those not in the trade everything gets complicated. Is nobody there to help me with the initial problem? It seems to me there is little assistance ... some time ago I had already validated CFv5, but now I do not know if it's worth to validate the rest ...
OK well when you said at the start that "the conditional does not work" what do you mean? What IS shown, and what is supposed to show instead?
And there are FAQs and demo connections. The problem isn't lack of documentation so much, it's that it's complicated.
And there are FAQs and demo connections. The problem isn't lack of documentation so much, it's that it's complicated.
You're right, but I think that a solution to my initial question there is no need to resort to CCv6 that is making me more confused. I do not have a lot of knowledge and I was beginning to become familiar with CCv5. I tried what I know and it does not work. Could it be that there is not someone who can solve this small problem?
We can try to solve it together if you answer my question🙂
OK well when you said at the start that "the conditional does not work" what do you mean? What IS shown, and what is supposed to show instead?
I thank you for your patience and I hope to be clear.
In "Admin List - Actions - Edit" I open the edit window (cattura001) and up to here everything is fine. When I report the data there is a conditional question that comes from CFv5 "Cattura spedizione uguale?" and the data, as you can see, arrives exactly.
If the answer, if "No" should appear the window you see in capture002, otherwise the window does not appear.
I was thinking of solving with
Thanks for your patience
In "Admin List - Actions - Edit" I open the edit window (cattura001) and up to here everything is fine. When I report the data there is a conditional question that comes from CFv5 "Cattura spedizione uguale?" and the data, as you can see, arrives exactly.
If the answer, if "No" should appear the window you see in capture002, otherwise the window does not appear.
I was thinking of solving with
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />But this does not work. I am convinced that this is a stupid mistake ... and yet I do it! :-(
<br />
<?php
if ($Calessini.spedizione == "Si"):
?>
<table width="50%" border="1" style="border-collapse: collapse;">
<tr>
<td colspan="2" align="center"><b><font style="color:red;">L'indirizzo di spedizione è lo stesso</font></b>
</td></tr>
</table>
<?php else: ?>
<table width="50%" border="1" style="border-collapse: collapse;">
<tr>
<td colspan="2" align="center"><b><font style="color:red;">L'indirizzo di spedizione è:</font></b>
</td></tr>
<tr>
<td width="50%"><b>Nome e Cognome:</b> {Calessini.nomesp} {Calessini.cognomesp}</td>
<td width="50%"><b>Ind.:</b> {Calessini.indirizzosp}, {Calessini.civicosp}</td></tr>
<tr><td width="50%"><b>Cap: </b> {Calessini.capsp}</td>
<td width="50%"><b>Città:</b> {Calessini.cittasp}</td></tr>
<tr><td width="50%"><b>Prov.:</b> {Calessini.provinciasp}</td>
<td width="50%"><b>Telefono:</b> {Calessini.telefonosp}</td></tr>
<tr>
<td width="50%"><b>Email:</b> {Calessini.emailsp}</td><td></td></tr>
</table>
<?php endif ?>
Thanks for your patience
Instead of "Si" and "no" you should set your dropdown to send the VALUES 0 and 1, and show the LABELS "Si" and "no". Then you can just do
Also, just before that conditional, can you echo the value of $Calessini.spedizione to make sure it has the value you're expecting it to?
if ($Calessini.spedizione)
Also, just before that conditional, can you echo the value of $Calessini.spedizione to make sure it has the value you're expecting it to?
If I understand, when I change the yes / no with 0/1 I should then be able to see the data with:[pre]
<label> Indirizzo spedizione uguale? </ label> <input type = "text" class = "input-mini" style = "font-weight: bold" name = "Calessini [spedizione]" /> <br />[/pre]
Then the conditional:
Today I try and let you know.[br]Thanks for now.
<label> Indirizzo spedizione uguale? </ label> <input type = "text" class = "input-mini" style = "font-weight: bold" name = "Calessini [spedizione]" /> <br />[/pre]
Then the conditional:
<?php if ($Calessini.spedizione == 0): ?>should work ...
Today I try and let you know.[br]Thanks for now.
You don't need to do if xxx == 0.
0 equates to false, 1 equates to true. So
is the same as
So on and so forth.
http://php.net/manual/en/types.comparisons.php
0 equates to false, 1 equates to true. So
<?php if ($Calessini.spedizione): ?>Is the same as
<?php if ($Calessini.spedizione == true): ?>
is the same as
<?php if ($Calessini.spedizione == '1'): ?>
So on and so forth.
http://php.net/manual/en/types.comparisons.php
Even with true / false it does not work
begin to have a doubt.
When I recall the data with:
When I insert it between the <? Php tags it does not work.
Can this be the problem?
begin to have a doubt.
When I recall the data with:
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />the data is reported as "0" or "1"
When I insert it between the <? Php tags it does not work.
Can this be the problem?
<?php if ($Calessini[spedizione] == '1'): ?>
Shouldnt it be $form->data["field"] ?
Now I'm in confusion and full of doubts :-((
$ form-> data ["field"]
it is not the same as:
$ form->Calessini ["spedizione"] =
$ form-> ModelTitle["field"]
form is the name of the form in CFv5 ??? or... 😶
$ form-> data ["field"]
it is not the same as:
$ form->Calessini ["spedizione"] =
$ form-> ModelTitle["field"]
form is the name of the form in CFv5 ??? or... 😶
I'm trying to print on screen
if I avoid the Php ... it works
<?php echo $form->Calessini["spedizione"]; ?>but no result...
if I avoid the Php ... it works
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />
What about $form->data["spedizione"]
Or $form->data["Calessini"]["spedizione"]
Nothing. It seems that the data
appears in HTML but not in PHP ...
"Calessini[spedizione]"
<input type = "text" name = "Calessini[spedizione]" />
appears in HTML but not in PHP ...
Hi ErixSr,
The format is the last one that healyhatman posted
Bob
The format is the last one that healyhatman posted
<?php echo $form->data['Calessini']['spedizione']; ?>Adding a debugger action will show you the names and values of the form data.
Bob
Hi GreyHead,
I tried
Not having complete knowledge of CCv5, could you tell me where to insert the debugger action?
Thank you
I tried
<?php echo $form->data['Calessini']['spedizione']; ?>but I did not have any answer.
Not having complete knowledge of CCv5, could you tell me where to insert the debugger action?
Thank you
Hi ErixSr,
Just to be clear is this ChronoForms v5 or ChronoConnectivity v5? There isn't normally form data in CC.
In CCv5 there is a Display Debug option near the bottom of the Front List > Settings tab.
Bob
Just to be clear is this ChronoForms v5 or ChronoConnectivity v5? There isn't normally form data in CC.
In CCv5 there is a Display Debug option near the bottom of the Front List > Settings tab.
Bob
I still highly recommend giving up and learning V6. You're already struggling, might as well struggle towards the current version.
Hi Bob,
summary the work:
1) I have prepared the form in ChronoForms5 and it works perfectly. the form arrives both to me and in copy to the client.
2) always in CFv5 I created the table (amod_calessini) that records every form sent.
3) With ChronoConnectivity5 I interrupt the table (amod_calessini) and all the data are reported.
At the moment I'm working in "Admin List" -> action -> Edit;
I created a linkable voice that gives me the opportunity to see all the details of that Id and possibly modify it.
The problem arises when I have to perform conditional If / then:
If shipping address is Equal then "same address"
"else" "the shipping address is:" etc.
If I report in the CC5 the result of the radiobox in CF5 this is reported quietly

By entering in PHP
summary the work:
1) I have prepared the form in ChronoForms5 and it works perfectly. the form arrives both to me and in copy to the client.
2) always in CFv5 I created the table (amod_calessini) that records every form sent.
3) With ChronoConnectivity5 I interrupt the table (amod_calessini) and all the data are reported.
At the moment I'm working in "Admin List" -> action -> Edit;
I created a linkable voice that gives me the opportunity to see all the details of that Id and possibly modify it.
The problem arises when I have to perform conditional If / then:
If shipping address is Equal then "same address"
"else" "the shipping address is:" etc.
If I report in the CC5 the result of the radiobox in CF5 this is reported quietly
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />
By entering in PHP
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" /><br />Warning, the code after else is the result of attempts so it can be wrong
<?php if ($form->data['Calessini']['spedizione'] == '1'): ?>
<table width="50%" border="1" style="border-collapse: collapse;">
<tr>
<td colspan="2" align="center"><b><font style="color:red;">L'indirizzo di spedizione è lo stesso</font></b>
</td></tr>
</table>
<?php else: ?>
<table width="50%" border="1" style="border-collapse: collapse;">
<tr>
<td colspan="2" align="center"><b><font style="color:red;">L'indirizzo di spedizione è:</font></b>
</td></tr>
<tr>
<td width="50%"><b>Nome e Cognome:</b> {Calessini.nomesp} {Calessini.cognomesp}</td>
<td width="50%"><b>Ind.:</b> {Calessini.indirizzosp}, {Calessini.civicosp}</td></tr>
<tr><td width="50%"><b>Cap: </b> {Calessini.capsp}</td>
<td width="50%"><b>Città:</b> {Calessini.cittasp}</td></tr>
<tr><td width="50%"><b>Prov.:</b> {Calessini.provinciasp}</td>
<td width="50%"><b>Telefono:</b> {Calessini.telefonosp}</td></tr>
<tr>
<td width="50%"><b>Email:</b> {Calessini.emailsp}</td><td></td></tr>
</table>
<?php endif ?>
Hi healyhatman,
I take your advice, it's right to work on a current product. The point, as I told you in another post is that I have always worked with 5, the form is already online and works. I wanted to complete the project with 5 and then devote myself more calmly to learning the 6 .... that's all.
I take your advice, it's right to work on a current product. The point, as I told you in another post is that I have always worked with 5, the form is already online and works. I wanted to complete the project with 5 and then devote myself more calmly to learning the 6 .... that's all.
Hi Bob,
sorry but I had forgotten the debugger from this result

the data arrives but is not processed in Php
sorry but I had forgotten the debugger from this result

the data arrives but is not processed in Php
So you told us repeatedly it's from a form but it's really a data read?
The conditional choice if then exists in the form. That is yes / no. The data, stored in the db, table "amod_calessini" is read by CConnectivity. In fact, he reports it correctly. The problem is when CC has to process that data in php, to make the other fields appear
I explained myself badly from the beginning ...
I did not explain that with CC I manage all the forms that arrive.
in these forms it is expected to insert a different address of the sender for the shipment. If this other address does not exist, I would like the corresponding fields not to appear. That's why I would like to get this result also in CC with Php (if then) and the given calessini.spedizione coming from the form.
I hope I have been clear and thank you for your patience
I did not explain that with CC I manage all the forms that arrive.
in these forms it is expected to insert a different address of the sender for the shipment. If this other address does not exist, I would like the corresponding fields not to appear. That's why I would like to get this result also in CC with Php (if then) and the given calessini.spedizione coming from the form.
I hope I have been clear and thank you for your patience
as I said, this is the data that appears in CC5 when it reads the data from the table "amod_calessini". This data can be "Si" (Yes) or "No" (No) and on this choice the conditional in php should work. And this does not

It would be SO much easier in v6. It would just be a switch, in the table column view you would put {fn:switch_name}. In the switch, you would put data source {var:table_view_name.row.model.calessini}, and your options would be 1:blahblah and 0:otherblahblah. Done.
But whatever. Let's keep trying.
Where are you putting this PHP code? Have you tried putting it in "PHP functions", as something along the lines of
But whatever. Let's keep trying.
Where are you putting this PHP code? Have you tried putting it in "PHP functions", as something along the lines of
model.field:if($row['model']['field'] == 1) return "HTML THAT I WANT"; else return "SOME OTHER HTML CODE";
A question: if I enter
Why if I insert the request among the php tags the same is not returned?
<label> Indirizzo spedizione uguale?</label><input type="text" class="input-mini" style="font-weight: bold" name="Calessini[spedizione]" />The result of the variable will be returned
"Calessini[spedizione]"
Why if I insert the request among the php tags the same is not returned?
<?php echo $Calessini[spedizione];?>
Because that's just not how it works. You've been given the syntax.
Where are you putting this code?
Where are you putting this code?
Hi healyhatman,
I finally solved thanks to the syntax you gave me.
The error was in comparing If with "Yes" instead of with 1 or 0.
Unfortunately, when you do not have a good preparation like me and little time to study you make ugly figures like I did. ...
Thanks and see you soon .... 🤗😶
I finally solved thanks to the syntax you gave me.
The error was in comparing If with "Yes" instead of with 1 or 0.
Unfortunately, when you do not have a good preparation like me and little time to study you make ugly figures like I did. ...
Thanks and see you soon .... 🤗😶
Please mark the relevant post as the answer please🙂
This topic is locked and no more replies can be posted.