Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to submit the webform data I am creating to another database which is set up in my settings.phd db array.
Previously, I whave written a module where I use db_set_active('other_db') then submit the form, then switch back to db_set_active('default').
How do I do this with the webform module?
It looks like a great module and looks like it could save me alot of time, but I need to submit to a DB other than the drupal default db.
Thanks
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedCurious - has no one done this?
Comment #2
quicksketchI'd suggest you use Database table prefixes such as "db2.webform_submissions" in your settings.php file for all the webform tables (webform_submissions, webform_submitted_data, etc.) Changing the database just on form submission would not be adequate, because all the listings and results would also need to pull from those tables. I'm closing this issue directly considering it's age.