1

I've customized my form, it's a regular order form that has 2 payment options right before the buy now button. I need to have the data going to autoresponder regardless of the payment option chosen...when they choose option 1 (cash), the form will redirect them to the thankyou page...but now that I have 2 radio buttons, how do I separate these events? How do I make them see the thankyou page if they choose option 1 - and redirect them to paypal if they choose the option 2?

<div class="gt-box">
  <div class="gt-labelpos">
    <label class="gt-label" id="500">How You Pay Mister?</label>
  </div>

  <div class="gt-inputpos">
    <div class="clrB">
      <input name="custom_payme" type="radio" class="gt-req gt-valid__required"
        checked="checked" value="cash"></input>
      <span class="gt-text">Ca$h</span>
    </div>
    <div class="clrB">
      <input name="custom_payme" type="radio" class="gt-req gt-valid__required"
        value="PayPal"></input>
      <span class="gt-text">PayPal</span>
    </div>
  </div>
  <em class="clearfix clearer"></em>
</div>
topless
  • 8,069
  • 11
  • 57
  • 86
TM23
  • 1,279
  • 2
  • 10
  • 17

2 Answers2

2

Another approach which will help you prevent redirects is on submit button click to evaluate your radio value and redirect from there. You Javascript code would look something like this

$('.submit-btn').click = function(e) {
  e.preventDefault();
  if ($('.custom_payme').val() === 'cash') {
    $.post("Your post url for cash", form_data);
  }
  else {
    $.post("Your post url for Paypal", form_data);
  };
};
topless
  • 8,069
  • 11
  • 57
  • 86
  • This seems like a good idea, will test it out...although Im not sure how will the responder grab the data, I suppose it wont be a problem – TM23 Jul 25 '13 at 09:08
  • would jquery post be different from js example you gave? – TM23 Jul 25 '13 at 09:18
0

On you server side when you receive your form's data, you can check the value of the radio button and according to that redirect respectively.

topless
  • 8,069
  • 11
  • 57
  • 86
  • I'm out of ideas how to actually do that. The autoresponder form editor has one redirect action assigned for this form. And that action is - after someone clicks the order button, show them the thank you page. How can I add another action if the autoresponder has only one redirect field in the form settings? – TM23 Jul 25 '13 at 08:55
  • It sounds like you are using some kind of framework or tool for it, share it with me, and we can check if it is doable in your case. – topless Jul 25 '13 at 08:57
  • it's a autoresponder software...dont know if Im allowed to advertise those things here...GR are the initials of it :) within the software you can manage your own web forms, so I customized my existing form with their parameters so I could benefit from all the perks of the autoresponder - it collects the data and redirects the customer to the thankyou page. The redirect part is actually handled in the control panel of the autoresponder, you put the http address you wish in the redirect field. But now I need 2 redirects...one for cash and one for paypal...and the functionality of responder – TM23 Jul 25 '13 at 09:06
  • I can't really say, its a good advertisement of something that its not working :) Sharing will might help people of the product to make it better. – topless Jul 25 '13 at 09:20