If I save the contents of a form using the DBSave component, is it possible to retrieve the cf_id of that table entry?
Forums
DBSave: retrieving the cf_id of the saved form
Please accept my apologies.
Searching in the forums using the keyword cf_id turned up this article here, which answers my question.
Sorry.
Dave
Searching in the forums using the keyword cf_id turned up this article here, which answers my question.
Sorry.
Dave
Hi Dave,
The search box on the FAQs page (which uses MijoSearch) is pretty good now, that's a good place to start. I use it all the time to find FAQs, forum search isn't too bad either.
Bob
The search box on the FAQs page (which uses MijoSearch) is pretty good now, that's a good place to start. I use it all the time to find FAQs, forum search isn't too bad either.
Bob
In chronoform v5 I have not found the item $form->data ['id'].
There is an alternative method to retrieve the id of the record saved?
There is an alternative method to retrieve the id of the record saved?
Hi Vales,
That's not available in v5 but I have just added it and you may contact me for a patch, however, you can also get that value using the code below:
Regards,
Max
That's not available in v5 but I have just added it and you may contact me for a patch, however, you can also get that value using the code below:
\GCore\Models\MODEL_ID_HERE::getInstance()->id
Regards,
Max
Hello Max,
thanks for the suggested solution. At the moment it is sufficient that one.
I would recommend to find in future versions also a method to retrieve the auto-generated fields in the table:
created, modified, user_id
they may be useful in the template of the email, or other uses.
Regards, Vales
thanks for the suggested solution. At the moment it is sufficient that one.
I would recommend to find in future versions also a method to retrieve the auto-generated fields in the table:
created, modified, user_id
they may be useful in the template of the email, or other uses.
Regards, Vales
Hi Vales,
No problems, but the other values can be acquired using normal PHP:
Regards,
Max
No problems, but the other values can be acquired using normal PHP:
$created = date("Y-m-d H:i:s", time());
$user = JFactory::getUser(); //id = $user['id']
Regards,
Max
This topic is locked and no more replies can be posted.