Title: Javascript callback function :: how to create object with submission details
Last modified: August 30, 2016

---

# Javascript callback function :: how to create object with submission details

 *  Resolved [cichy](https://wordpress.org/support/users/cichy/)
 * (@cichy)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/)
 * Hi,
 * I was searching for a solution on how to pass submission details and specifically
   the entry id into the Javascript callback function. I have found an article on
   calderawp describing how this can be done but the most important part (example)
   is missing for some reason.
 * What I am trying to achieve is to pass entry id as an order id into the tracking
   code.
 * I am able to call the javascript callback function with the tracking code inside
   of it on ajax submission but I don’t know how to get the value of entry id and
   pass it to the code.
 * Would someone be able to help me with it?
 * Thank you,
    Przemek
 * [https://wordpress.org/plugins/caldera-forms/](https://wordpress.org/plugins/caldera-forms/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [cichy](https://wordpress.org/support/users/cichy/)
 * (@cichy)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-6524461)
 * sorry for spamming. I guess that my two previous posts were going through verification
   because of the URLs I’ve used.
 *  Plugin Author [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-6524480)
 * The object passed should have a key _entry_id, if you are tracking entries in
   that form.
 *  Thread Starter [cichy](https://wordpress.org/support/users/cichy/)
 * (@cichy)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-6524578)
 * Thank you very much for your reply. Could you please provide me with an example
   of a callback function that contains this object with key _entry_id?
 *  Plugin Author [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-6524658)
 * I was wrong. It is “cf_id” that has the entry ID. If you set the callback function
   to be “cf_submission_cb” then something like this should work:
 * `<script>function cf_submission_cb( obj ) { console.log( obj.data); alert( obj.
   data.cf_id ) }</script>`
 *  Thread Starter [cichy](https://wordpress.org/support/users/cichy/)
 * (@cichy)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-6524664)
 * It works. You’re a great 🙂 Thank you very much for that. This feature is also
   great 😉
 *  [mgmtcircle](https://wordpress.org/support/users/mgmtcircle/)
 * (@mgmtcircle)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-8477996)
 * Hi Josh,
    something strange is going on. I cannot access the data object, because
   for some reason, it is populized like this: Object { amp;cf_id: “70”, amp;total:“
   1190.00”, amp;veranstaltung: “Schwierige Prüfgespräche souverän m…”, amp;termin:“
   07.12 – 08.12.2016”, amp;event_id: “12H5239” }
 * why ist there an “amp;” before every name?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Javascript callback function :: how to create object with submission 
details’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/caldera-forms_475846.svg)
 * [Caldera Forms - More Than Contact Forms](https://wordpress.org/plugins/caldera-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/caldera-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/caldera-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/caldera-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/caldera-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/caldera-forms/reviews/)

## Tags

 * [callback](https://wordpress.org/support/topic-tag/callback/)
 * [submission](https://wordpress.org/support/topic-tag/submission/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * 6 replies
 * 3 participants
 * Last reply from: [mgmtcircle](https://wordpress.org/support/users/mgmtcircle/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/javascript-callback-function-how-to-create-object-with-submission-details-1/#post-8477996)
 * Status: resolved