Hi! Although this is my first post, trust me, I've read just about this entire forum. Exaggeration aside, I have a couple of questions:
1) I'm building a form which redirects to Paypal (using the plugin). I have a radio list ending with an "other", followed by a text box. I used the following PHP in the OnSubmit box to update the hidden input going to Paypal:
For some reason, although the "totalamount" in my email comes out correctly, The URL being output to Paypal does NOT inclue the figure in "totalamount".
Any ideas why?
2) I have a second radio list. I'd like to have that if a certain one is selected, the form does NOT redirect to Paypal, but instead just displays a message. This is what I've come up with so far (for my OnSubmit box):
Any help would be greatly appreciated 🙂
1) I'm building a form which redirects to Paypal (using the plugin). I have a radio list ending with an "other", followed by a text box. I used the following PHP in the OnSubmit box to update the hidden input going to Paypal:
$totalamount = JRequest::getInt('amount', 0, 'post') + JRequest::getInt('otherChoice', 0, 'post');
JRequest::setVar('totalamount', $totalamount);
.For some reason, although the "totalamount" in my email comes out correctly, The URL being output to Paypal does NOT inclue the figure in "totalamount".
Any ideas why?
2) I have a second radio list. I'd like to have that if a certain one is selected, the form does NOT redirect to Paypal, but instead just displays a message. This is what I've come up with so far (for my OnSubmit box):
if(JRequest::getVar('paymentmethod') != 'PayPal'){
$MyForm->setFormData('redirecturl', 'THIS IS MY QUESTION!');
}
Any help would be greatly appreciated 🙂