I have created a Form, using the Forms Tool. (oups, Version 7)
Once the form is completed by the end user and the submit button is pressed, I use the "Redirect to URL:" option, to show other related informations to the user, BUT I also need to show the user the ID (sequential number) of the form he has just submited (as a proof), ID which is already persisted on the Kentico Forms Table (FormId).
So, how can I (retrieve and) show the user this information or any other information he/she just have submitted, and is already persisted on the DB on the redirected page ? (I can't just retrieve the last #id from the DB, it is not safe enough to do so)
You could include the id in the url as a macro parameter:
Then have a webpart or alternative form that displays the data using labels to the user.
You can also leverage the Forms events and add your code to the OnAfterSave event. You could then get the form ID or whatever other properties you want and pass it to what ever.
Check it out here: Working with form dats using the API
Thanks Joshua, but I think my problem still remains: I don't have an ID yet, my form has not been created. I'll give it a try dough.
In fact Joshua, you were right, but I had to change your code to:
Thanks a lot
Glad it worked!
Please, sign in to be able to submit a new answer.