If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Forms to separate recipients...

Not exactly sure where to post this one, so I'll give it a try here...

I'm doing a donation form that consists of information the client (a school) wants to capture about the donor, plus have it process the donation information to a secure processing site.

Now my issue...

I have it working where the total is passed to the sure processing site and all works well. Now I would like to send the remaining data to another recipient, a contact at the school which will collect the information. I have an address to a script in another form that sends that data to a recipient, and that works fine.

Normally the data is sent to the server script, which splits the data and sends that to the required recipient(s). Ideally the server script must be change to accomplish this.
It could possible be done with a hidden iframe and JavaScript, or if the secure server returns data to your page, to use this to send an email.

At least 98% of internet users' DNA is identical to that of chimpanzees

When you send the data to the payment site, all entered data is lost, unless this is saved in some way or the payment site returns a confirmation page with the data.
You can't send data to 2 sites simultaneously unless you:
1. send data to your server sctipt which splits the data to the 2 addresses. <- ideal solution
2. use an iframe to send part of the data to a 2nd address
3. use Ajax in combination with a server script to send part of the data to a 2nd address

At least 98% of internet users' DNA is identical to that of chimpanzees

Not sure what you mean... Once the user goes to the payment site, the donation value is carried from the form, the user then fills out the payment info, and once it's confirmed/rejected, it sends them to a thanks/error pages.

You could try this. It creates a hidden frame in the document which contains a copy of itself.
After filling-out the form you press submit button which copies the data to the hidden form, submits it to your form.cgi, then submits the data to the payment site.

- I need just the script, correct?
- I saw your comments, so I just have to replace a few things, I assume:
- what is "hide it"?
- what do you mean by "maybe different in your case"?
- the name of my form is "donation" - good guess :-)
- I inserted my cgi script that was given to me
- Where do I put where the information go to?
- Does this script collect all the fields?

This hides the iframe from the user. Having it visible would only confuse them.

what do you mean by "maybe different in your case"?

I referenced a button element to fire the function when submitting. You could be using an input, image or plain anchor to do this. I also don't know if you have a validation function which could interfere with the process.

the name of my form is "donation" - good guess :-)

Shall I now guess your password?

I inserted my cgi script that was given to me
- Where do I put where the information go to?

You will have to know how the cgi script is configured. That should be explained in it's documentation.

Does this script collect all the fields?

Yes, but it's the cgi script that will actually save only what you require.

The solution given is a generic one. It would be possible to create a specific set of fields in a form in the iframe, or load an existing document tailored to you requirements. This would require knowing all form control name's and type's.

At least 98% of internet users' DNA is identical to that of chimpanzees