Hi @jamminjames
By default, this is not possible and this will be outside the scope of support to provide such a thing. For that, you’ll need to hire a developer to provide the required custom code for you. WordPress provides a jobs directory here https://jobs.wordpress.net/, if you need further advice about it, feel free to email [email protected].
– Subject: ATTN: WPMU DEV support – wp.org
– Link back to this thread for reference (https://ww.wp.xz.cn/support/topic/writing-to-fields-after-submission-using-api/)
Kind Regards,
Kris
I’m confused. You say, “By default, this is not possible,” but the link I gave is to another support thread here with an explanation of how to do it. I was only asking for some clarification. I don’t need a developer, as I am one. Since you folks explained it at the link, can’t you give me a little clarification? Thanks.
Hello @jamminjames
Hope you’re doing well today!
Sorry for the confusion, If I am able to understand your requirement correctly, you are referring to the other thread, and specifically the reply – https://ww.wp.xz.cn/support/topic/submit-data-to-another-db/#post-16744321. If not, please let us know as there are multiple snippets involved in the discussion you’ve referred to.
Further, based on what you are trying to achieve, you can try using the $prepared_data as below and see if that helps.
Forminator_CForm_Front_Action::$prepared_data;
// your query for DB
This should help.
Kind Regards,
Saurabh
In the code provided at https://ww.wp.xz.cn/support/topic/submit-data-to-another-db/#post-16744321, what does $module_object refer to?
Also, is there any Forminator API hook that can be used to update form data in the database?
-
This reply was modified 1 year, 1 month ago by
jamminjames.
Hi @jamminjames,
I hope this message finds you well.
The $module_object refers to an instance of an internal class used by Forminator to manage the form that is currently being submitted. This object holds various properties of the form. It also provides methods that allow developers to interact with and manipulate the form during the submission process. By accessing $module_object, you can retrieve important form data or perform specific actions that are necessary for handling the form submission effectively.
Can you please confirm if you are looking forward to updating the form data in the database, which has already been submitted? I am afraid, Formaintor does not have an API hook that can help with this.
Please feel free to get back to us if you need any further clarification.
Best Regards,
Nebu John
Yes, I want to update form data which has already been submitted. So, no way to do that via the API — okay, that’s what I wanted to know. I’ll have to do it by more conventional means. Thank you.