dear chronomnicient ones-
background:
I have a form which does a sale, posting the data to paypal, which returns on ipn and mails the customer a welcome letter. Problem is, that my name and email address are where that mail gets sent. The payer_email is passed roundtrip and referenced for this, or should be at least. While building this, i had coded all of my info into the form as default values which i assumed to be the source. However, after finding those values i've cleared the form but it appears as if it is still there somehow when i test it. Is there some kind of cache i can clear that is specific unto Chronoforms or, failing that, some incantation i can utter?
Thank in advance
Bart
I think ive found it- on IPN im supposed to be looking up the user data saved before the PP transaction and the conditions were blank, returning the first record who was, you guessed it, me. That said, how does one target the vars returned from the IPN? or do i just present the varname in PHP like this? is the postback varset just at the root ? If not, how is that object named?
<?php
return array('data.varname' => $varname );
?>
OK solution is this for the where clause:
<?php
return array('Data.accesstoken' => $form->data["custom"]);
?>
What drives me nuts though is that the objects/scope are never really explained or mapped out anywhere, so ill give the best explanation i can for other dolts like me.
Apparently when the IPN returns data to your listener, the variables are stored within a form object that's created behind the scenes in the chronoware. Now maybe one can access a response object directly, but that's not really obvious, at least to me. Why are those variables not located within the root collection and available via {$var}? And why does case sensitivity come into play? e.g. the code---- return array('Data.accesstoken' => $form->data["custom"]); works while return array('data.accesstoken' => $form->data["custom"]); will not?
anyway, i hope that helps someone else
Thanks for the direction Bob- What i would've done for that clarification a few nights ago...
So just to recap
The form array is populated from all sides and functionally the variable repository for chronoforms:
1. $_Get and $_Post Values populate the form
2. Records from dbread
3. Of course initial or subsequent Form values.
Sorry to be so obtuse, those points have been tough to find
Hi Bart,
You've go it. The $form->data[''] array is the ChronoForms pack-horse - everything is loaded onto it and taken off it.
The Session to Data and Data to Session actions use it, the DB Read action, the Email template, etc . . . Custom code can change the data in it.
If you want to see what is in it add a Debugger action to the Event - you can add more than one and drag them up to specific locations if you need to see exactly what is happening. In CFv5 you can enable/disable them as needed.
Bob