Using {fabrik_internal_id) or display of form number

Status
Not open for further replies.

sanshaar

New Member
I need to display "Registration number" in the thank you page, email, and record it to the DB.

It does not have to display in the initial form.

I tried generating it with eval, but I get the code in the email and the DB, not the result.

I tried using {fabriq_intenal_id} - got nothing. (I don't even see this field in the DB table).

I searched documentation and forums, could not find the answer.

This is URGENT, I am willing to modify php if needed,

Thanks,
Sam D.
 
In the thank you message write your note and put the {registration} in betreen where your want your number to be.

The "registration" is the id value for the element.
 
I Tried. it does not work.

The registration is not a user input. it is the auto_increment id field from the table. I called it appid, I made an element with this name, and placed {appid} in the thank you. it does not show. it apears on the Db, not on the Thank you or email.
 
That is because the id is created after the form is submited, in order to show that number you have to do smoe thing else.
 
I understand I have to do something else. The question is what. or to be precise, how do I pull this number, AFTER form is submitted, in order to display it in the thank you page and email. I assume email and thank you are created after submission to the DB.
 
As far as I can tell there is no easy way to do this, however it may be possible to do something with the following on form submit:

Code:
global $database
$database->insertid();

insertid() returns the index of the last record created with the $database variable.
however my understanding is that if you run any PHP at the end of a form submit it cancels any actions afterwards, so email may not get posted.. ? Perhaps you could do something with CURL?
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top