Solved

How Can I Create a Form to Submit to Multiple Databases?

Posted on 2012-03-26
9
396 Views
Last Modified: 2012-04-16
Here's what we're trying to accomplish:

We have one form that submits data to a third party site. That form is very simple and works fine. We want to create a Gravity Form (or some other form database software) that will not only save all entries submitted to the Gravity database but will also send each submission to the third party site. Essentially, we need to be able to send to two forms using a single submission.

Gravity Forms is a very popular form plugin for WordPress that saves entries to a database. It's pretty straightforward, but doesn't have documentation for this particular issue: http://www.gravityforms.com/

How can we program a single button to submit to two different forms?
0
Comment
Question by:sc456a
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37769267
Technically it isn't that hard to do.   When you submit the form, you capture the form variables with PHP and then open a connection to database 1 and write the row, then close that connection and open a new one to database 2 and repeat.

However, if you are trying to do this within gravity forms, you are going to run into issues because the plugin is simply not designed to do this. Must this happen from within Wordpress or were you just using that to illustrate the issue?
0
 
LVL 1

Author Comment

by:sc456a
ID: 37769287
We are using WordPress for the site template, but we can write to another database to store the form entries - that doesn't really matter. The tricky part is that we have to use certain field IDs that match the existing fields on the third party database. So far I can't find a WordPress form plugin or form utility that will allow us to customize field IDs - they always append some code which can't be modified or removed.

I think what we're trying to do is simple, just as you mentioned, but we're having a tough time finding the best software to get it done.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37769363
You will probably not find something that fulfills your requirements. You're going to need to write your own PHP.

What I would do is create a custom page template in Wordpress and use that to hold all of the custom PHP needed to submit the form data to two places.  This bypasses the need to find a plugin but allows you to use all of the functionality of Wordpress still.

http://codex.wordpress.org/Pages#Page_Templates

Explains how to create a page template.  Once you have it, all you need to do is add your form and handling code.  Alternately, just create the form in Wordpress using the HTML tab of the visual editor but point the form to an external PHP file that does the processing.
0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 37769869
better you go for Web services .... onces your one DB save process over call your web services then it will update ur another DB .

other solution is RMI
0
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 37770767
Use Ajax, you can then submit to as many sites as you wish.
0
 
LVL 1

Author Comment

by:sc456a
ID: 37771467
I was hoping someone might know of a WordPress plugin or form software package that could accomplish this without custom programming, or at least with very little. If no one knows of anything, I'll just bid it out.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 37771758
I've looked at more form plugins than I care to remember.  None of them are configured to do a dual write so either you will be bidding out to alter the plugin or bidding out to create new functionality.
0
 
LVL 1

Accepted Solution

by:
sc456a earned 0 total points
ID: 37834079
I ended up using a custom built script and code in the Gravity Form to get this going.
0
 
LVL 1

Author Closing Comment

by:sc456a
ID: 37850354
No one really provided a solution so I had one built, but partial credit to Jason for looking into it and giving an honest assessment.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question