Use Forms to send Entrys to existing mysql tables in another db

By: Ferdinand Kreittmayr | Asked: 02/16/2023
ForumsCategory: General questionsUse Forms to send Entrys to existing mysql tables in another db
Ferdinand Kreittmayr asked 2 years ago
Hi community, I didn't find a solution for my problem yet - not here and not with google. I have the following situation:
1. For my mini-business I developed a database in MS-Access for contacts, projects and a lot of other things
2. I had to realize that this isnt working if two people have to work in that at the same time. So I migrated it to mysql - everything works like I want it and like we need it for our tasks
3. But now I want to extend the solution and database. The target is to develop something like a diary for construction sites. So each customer logs in and can post every day what they have done. The problem is, that my customers usually dont have MS Access. So I decided to realize this in Wordpress with plugins. So the problem is that I need to use my second mysql db to get information sent by formidable. The special is that the tables already exist, filled with data and stay in relations to each other (see screenshot). So I need to tell every formfield in what database-field the information has to be saved. Is there any solution - maybe with an addon or something?
Attachments
2 Answers
Best Answer
Victor Font answered 2 years ago
There's no add-on to help you use any DB tables other than Formidable's. However, because you are using WordPress, you have access to the global $wpdb object that can connect to any table or database and process SQL for you. What you would do is use the frm_after_create_entry hook to connect to your other table and run the SQL to populate your fields. Ideally, your external tables should be in a same database as WordPress, otherwise, you'd have to setup and ODBC connection.
Ferdinand Kreittmayr answered 1 year ago
Is it possible to populate Formfields default values from an external mysql-database? Maybe with webhooks too?
I need this because the other database already exists and can not be imported or something and is managed by MS Access
Victor Font replied 1 year ago

You would have to create your own custom shortcodes to get default values from an external database. Why can’t you import your MS Access data into Formidable as CSV?

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right