Cannot return cf_id from data array

Access the cf_id from a saved form in a multi-page ChronoForms setup.

Overview

The cf_id value is stored in the data array but cannot be directly echoed using the incorrect variable name.
Ensure you assign the cf_id to a variable from the correct array key before using it in your form elements.

Answered
h3 h311idunno 29 Oct, 2014
First I want to apologize for asking a question that has definitely been asked before. However, none of the solutions that were previously provided are working on my form.

I am ultimately trying to return the cf_id from the first database save into a hidden field on page 2 of a mult-page form and continue passing it to the end of the form in order to link multiple tables together.

To test this out I created a db save after the first page of the form is submitted, added a custom element to page 2 and attempted to print/echo the cf_id to the screen. Here is my code to echo:

<?php echo $formId.'test'; ?>
<?php $formId = $form->data['chronoform_data_cf_id']; ?>

All that appears on the screen is the text "test" without the cf_id. I used the debugger and of course cf_id is getting set in the data array ([chronoform_data_cf_id] => 97).

What am I missing?
h3 h311idunno 29 Oct, 2014
Answer
1 Likes
Apparently all i have to do is post on the forum to figure out the answer to my question in the next 10 min๐Ÿ™‚
This topic is locked and no more replies can be posted.