Jump to content

Show/hide text on checkout.tpl page when choosing Bank Transfer


stormy

Recommended Posts

I'm looking for a way to get a text to appear when clicking the radio button for the bank transfer gateway, and then be hidden again when clicking another radio button. I know it can be done with jquery, but I wonder if there's something already built-in that I can use.

If not, can someone give me some hints for the jquery function?

Link to comment
Share on other sites

I don't think there a way in WHMCS to do so, but here an Javascript example:

 

// Get the value of the current selected payment method
var CurrPaymentMethod = $ ( "input[name='paymentmethod']:checked" ).val();

// Action to do for method X (in this case, PayPal)
if (CurrPaymentMethod == "paypal") {

  // Display a div already in your template
  $ ( "#CustomMessageDiv" ).show();

  // Place text on an existing div
  $ ( "#CustomMessageDiv" ).html('My custom text');

}

Hope this help!

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated