| Post |
|
Member | neweb posts 10 4:31 pm February 26, 2009
| |
|
|
Hi
I am using cformsII to run a form for Domain registration on my website.
The form collects domain, business and contact information.
When the submit button is pressed the form takes the visitor to page 2
This page contains a Paypal Box (for them to re-enter their domain name) and a pay now button.
The box for the domain name is to give me some reference to the order placed on page 1
The process looks like a 2 page process when in fact, once the submit button (Step two Button) has been pressed it has already sent the form to me via email.
My question is this:
Is there anyway to populate the domain name box on page two from the domain box on page 1???
This would mean that the payment will have a reference to the domain name on the form.
Example:
(PAGE1)
Domain: testdomain.tld
Contact: joe blogs
Address: the street
– Next Step
"your almost done."
Domain: testdomain.tld
PAY NOW
If I can achieve this then I would have a direct link between the email from the site and the paypal payment conformation email.
If there is a better way to do this then just let me know and I will try that.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 8:39 pm February 26, 2009
| |
|
|
is the page 2 form also a cforms form?
if so, why not simply use multi-page form support, have the first form send an email as well (do not select 'suppress email..', then route to page 2 … which has an alternative action target set to paypal.
|
|
|
|
|
Member | neweb posts 10 11:57 pm February 27, 2009
| |
|
|
That sounds like the perfect solution only I don't know how to do that.
Is it easy to setup!!!!
When you are redirected to PayPal it needs to show the domain name selected.
I will see if I can find where to do this.
Thanks for your reply.
|
|
|
Member | neweb posts 10 12:35 am February 28, 2009
| |
|
|
OK I have set it up but I don't know how to setup the second form to go Directly to PayPal so they can make the payment.
How do I get the Domain name on Page 1 to populate the field on Page 2.
How do I then send that data to PayPal.
I'm lost at this point.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 9:12 am February 28, 2009
| |
|
|
here is roughly the 2-form-setup:
form #1
- enable the multi-part form feature
- point it to form #2
- do not enable the multi-part-form setting: 'suppress email ..'
- enable custom ID's / Names under core options
- add a [id:paypal-field-id] to your "shared field"
form #2
- enable the multi-part form feature
- select 'last form' of multi-part form series
- you can enable the multi-part-form setting: 'suppress email ..'
- enable custom ID's / Names under core options
- add a [id:paypal-field-id] to your "shared field"
- enable "Send form data" under Core Form Admin and opint it to the paypal form / URL
"paypal-field-id" must be the id that can be passed on to paypal.
|
|
|
|
|
Member | neweb posts 10 11:51 am February 28, 2009
| |
|
|
OK,
I tried all that and when you click the Pay Now Button on Page 2 it just takes you to the standard PayPal Home page.
This is what I am sending to PayPal
FORM1
[id:item_name]
FORM2
[id:amount]|278.24|
[id:add]|1|
[id:business]|info@myemail.tld|
Redirect is disabled and "Send form data" is enabled and sending to
https://www.paypal.com/cgi-bin/webscr
Also Tried https://www.paypal.com/ but still no joy.
Just can't seen to get it to do wnat I want.
The instructions on the PayPal site are not helpfull as all as they don't give you examples.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 5:22 pm February 28, 2009
| |
|
|
A few notes:
- only items/fields on form #2 will be POSTed to the destination
- if you want anything on form #1 to be transmitted to paypal as well you need to add a hidden field to form #2 with the same ID/Name
- all cforms does is to POST it's fields to Paypal
- form #1 can be used to email & track user input
- form #2 is responsible for forwarding all 'validated' fields to paypal
- use Firefox/Firebug to see what is in fact handed off to paypal
- If you have issues on the paypal side, check with their support
|
|
|
|
|
Member | neweb posts 10 1:55 am March 1, 2009
| |
|
|
I think I almost have it.
I managed to get it to open the correct Paypal page with the correct details.
The only thing I'm not getting is the domain field passed from form 1
This is what I have
These are the field I'm trying to link.
#FORM1
Domain Name Required[id:os0]
#FORM2
[id:os0]
Other then that the paypal page is showing all the correct information
The domain field should read (on the paypal site)
Domain: domainname.tld
But all its showing is:
Domain:
Am I missing something in the way I am doing it!
Thanks for taking me this far.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 8:49 am March 1, 2009
| |
|
|
What is your URL?
I assume that [id:os0] is your hidden field? You might still want to give it an actual label,e.g domain name[id:os0]
Can you verify that being on Form #2 shows (in the HTML source code view) the domain name correctly?
Is "os0" what is being expected by paypal?
|
|
|
|
|
Member | neweb posts 10 11:19 am March 1, 2009
| |
|
|
I assume that [id:os0] is your hidden field? You might still want to give it an actual label,e.g domain name[id:os0]
Thats correct.
On form 1 its set to
domain name[id:os0] / Single Line of Text
On form 2 its set to
domain name[id:os0] / hidden field
Can you verify that being on Form #2 shows (in the HTML source code view) the domain name correctly?
It appers (in the HTML code) that the information is not being passed to the second form.
Is "os0" what is being expected by paypal?
Thats correct.
To test the PayPal link I changed the field on FORM2 from hidden to text box. I then filled in the box manualy with the domain.
Everything worked perfectly.
It seems I cant get the content of the field on form1 to pass to form 2.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 11:27 am March 1, 2009
| |
|
|
|
|
Member | neweb posts 10 12:43 pm March 1, 2009
| |
|
|
Sorry 
http://design.newebirl.net/hos…..ing/dhbas/
This is to the first Page in the form
The second page only has the Pay Now button. The rest of the fields are hidden fields.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 12:48 pm March 1, 2009
| |
|
|
It looks ok, but could be either a v10.2 issue, so you might want to upgrade to 10.3 + Patches, or double check your form config.
I tried the same setup and it works fine here.
|
|
|
|
|
Member | neweb posts 10 2:31 pm March 1, 2009
| |
|
|
I have upgraded cforms and its still the same.
I'm completely lost as what to do next.
I think as the form is not passing the information to the second form I have no option but to enable the box so they can retype the domain name so I have some link to the first form sent.
I have tested it in a number of browsers and still the same results.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 3:38 pm March 1, 2009
| |
|
|
What is interesting is that form #1 does indeed send the proper value to form #2, but it isn't 'picked' up.
Did you set the alternative action also for #1? this would be a problem.
Also, moving from form #1 to form #2 doesn't show an intermins (form#1's) success message…
|
|
|
|
|
Member | neweb posts 10 5:40 pm March 1, 2009
| |
|
|
Did you set the alternative action also for #1? this would be a problem.
Thats it, you got it.
When I checked the first form it had the redirect set to the second form.
I disabled this and it sent the information perfectly.
The Paypal link now shows the domain name you enter on the first form.
When I click the Next Step button it appers that the form is staying on page 1 of 2
Thats not a problem as I can delete the second page and put in a text field to wright the text that appers on the second page.
Thanks for your help with this…. there is no way in the world I would have got it without your help.
|
|
|
Admin
| Oliver Munich, Germany posts 6237 5:42 pm March 1, 2009
| |
|
|
No problem, you're welcome.
Also, you can of course adjust form #1's success message to show the leading text part of the second form ('introducing' form #2 and e.g. inculding a "wrap-up" showing what has been entered in the first form).
|
|
|
|
|
Member | neweb posts 10 5:57 pm March 1, 2009
| |
|
|
I wouldn't even know where to begin doing that 
I can also add a number of text only fields with custom CSS to format everything!
|
|
|
Guest
| Jonah 6:12 pm May 20, 2009
| |
|
|
Hey everybody,
I wrote a little javascript to be able to get the value of whatever you're using for your amount field (select, radio, etc..) and set the value of your hidden amount field for sending to PayPal.
First, you're going to need the jQuery field plugin: http://www.pengoworks.com/work…..plugin.htm
You'll also need to have one field in your form for the amount to be selected and another hidden field with the amount that will be sent to PayPal. In my cforms I have my donation radio field setup like so:
Donation Amount:[id:donation_amount]#$35.00|35.00#$50.00|50.00
And my hidden amount field is just setup like this:
[id:amount]
Here is script:
<script type="text/javascript"> var j = jQuery.noConflict(); j(document).ready(function(){ window.donationAmount = j('input[name="donation_amount"]'); window.hiddenAmount = j('input_hidden[name="amount"]'); window.donationAmount.change( function( objEvent ){ var donation = donationAmount.getValue(); j("input#amount").val(donation); var hidden = hiddenAmount.getValue(); alert(donation); alert(hidden); }); });
</script>
Note: if you use your own field names you'll need to update the script appropriately.
I hope this help!
- Jonah
|
|
|
Guest
| Jonah 6:14 pm May 20, 2009
| |
|
|
Sorry, I forgot to take out the alerts – for some reason the "hidden" alert doesn't even work but you can view the source to verify the hidden field is being updated. Here is the updated script without alerts:
<script type="text/javascript"> var j = jQuery.noConflict(); j(document).ready(function(){ window.donationAmount = j('input[name="donation_amount"]'); window.hiddenAmount = j('input_hidden[name="amount"]'); window.donationAmount.change( function( objEvent ){ var donation = donationAmount.getValue(); j("input#amount").val(donation); }); });
</script>
|
|