Hi, I am using the db record loader to load a record from a list of records, it uses the token=(cf_uid) in the url to load that record into the form.
In the form that the user info is being loaded into (the form code is in the CODE section tab and not in the custom code box), I am trying to echo the cf_id or cf_uid of the record that has been loaded.
I have tried the following, but this yields no results what so ever, I have even put in a debugger ONLOAD and the cf_uid and cf_id of the user are plain to see when the form loads, the form field named cf_uid and cf_id also get filled with the data, it echoing that field data seems impossible.
In the form that the user info is being loaded into (the form code is in the CODE section tab and not in the custom code box), I am trying to echo the cf_id or cf_uid of the record that has been loaded.
I have tried the following, but this yields no results what so ever, I have even put in a debugger ONLOAD and the cf_uid and cf_id of the user are plain to see when the form loads, the form field named cf_uid and cf_id also get filled with the data, it echoing that field data seems impossible.
echo 'Your CF ID Is :';
echo $form->data['cf_id'];
echo '----';
echo $form->data[cf_id];
echo '----';
echo $_POST['cf_id'];
echo '----';
echo $_POST[cf_id];
echo '----';
echo $_POST->cf_id;
echo '----';
echo $_POST->cf_id;
echo 'Your CF UID Is :';
echo $form->data['cf_uid'];
echo '----';
echo $form->data[cf_uid];
echo '----';
echo $_POST['cf_uid'];
echo '----';
echo $_POST[cf_uid];
echo '----';
echo $_POST->cf_uid;
echo '----';
echo $_POST->cf_uid;
echo 'no 1';
print_r($form->data);
echo $array;
echo 'no2';
print_r($_POST['cf_created']);
All I get is :
Your CF ID Is :--------------------Your CF UID Is :--------------------no 1no2
Yet when the record is loaded I can clearly see :
Data Array:
Array
(
[option] => com_chronoforms
[chronoform] => addupdatelead
[token] => bbf3cb935158dc10876ccb02cc33bc8f
[Itemid] =>
[cf_id] => 43
[cf_uid] => bbf3cb935158dc10876ccb02cc33bc8f
[cf_created] => 2012-01-02 01:13:10
[cf_modified] =>
So the data is there, it just seems not accessible other than to fill the form fields.
Your CF ID Is :--------------------Your CF UID Is :--------------------no 1no2
Yet when the record is loaded I can clearly see :
Data Array:
Array
(
[option] => com_chronoforms
[chronoform] => addupdatelead
[token] => bbf3cb935158dc10876ccb02cc33bc8f
[Itemid] =>
[cf_id] => 43
[cf_uid] => bbf3cb935158dc10876ccb02cc33bc8f
[cf_created] => 2012-01-02 01:13:10
[cf_modified] =>
So the data is there, it just seems not accessible other than to fill the form fields.
Hi crea2k,
This may be to do with the sequence that the actions are being run in. Try putting {cf_id} into the Form HTML and set 'Curly Bracket Replacer' to 'Yes' in the Show HTML action.
Bob
This may be to do with the sequence that the actions are being run in. Try putting {cf_id} into the Form HTML and set 'Curly Bracket Replacer' to 'Yes' in the Show HTML action.
Bob
Ok, I have found a work around for this, I still cant echo the POST array or form data array, but if you echo the GET data you can use that to get the info you need.
So basically >>>>
echo's the cf_uid (this can be changed to anything you want in the loader on the previous form)
You can then use that cf_uid to query the databse with to echo whatever info you like, so >>>>
Hope this helps anyone else with this problem as I have been having this problem for ages, you can echo the POST and form data just fine in the custom code box but try and do this in the form code tab and there seems to be no way of doing it, use the GET data and you can get the form fields into your form itself then🙂 .
So basically >>>>
echo $_GET['token'];
echo's the cf_uid (this can be changed to anything you want in the loader on the previous form)
You can then use that cf_uid to query the databse with to echo whatever info you like, so >>>>
$query = 'SELECT * FROM `table` WHERE `token`=' . mysql_real_escape_string($_GET['token']);
Hope this helps anyone else with this problem as I have been having this problem for ages, you can echo the POST and form data just fine in the custom code box but try and do this in the form code tab and there seems to be no way of doing it, use the GET data and you can get the form fields into your form itself then🙂 .
This topic is locked and no more replies can be posted.