This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 4
Getting entry id from embed.php
Started 9 years ago by JCornett | 2 posts |
-
I have a javascript system I am using to display multiple forms within a wizard interface. The part that I need is an accurate way to retrieve the entry ID from the embed.php file right before the redirect. That allows me to link the form that was just submitted to the person I have logged into our site (separate member database from MachForm).
I have done a dump of all assigned variables using PHP within the embed.php file and the only thing I can find is a session variable called $_SESSION['mf_success_entry_id']. However, my results have been inconsistent as this is occasionally an array. Can you describe what this variable is used for and how it is created?
Is there a better way to retrieve the insert ID from the database for how I am trying to use it?
Thanks so much for your help!
Posted 9 years ago # -
I think you can simply configure your form to display success message instead of doing redirect. On the success message, use the merge tag "{entry_no}" to display the entry ID. You can then parse the entry no using your javascript code and redirect the form to the URL you need.
MachForm Founder
Posted 9 years ago #
Reply
You must log in to post.