Is there a way to hide the Authorize.net payment gateway if you have a checkbox checked?
Question
Question
Answer
Hi Dylan,
There is no out-of-the-box function for hiding payment; you can do it with custom script like this:
First set payment to use field value instead of fixed value; this is because you cannot submit if payment value is not 0;
Then, use script to set payment value to 0 and hide the gateway frame like this (the checkbox field has class "hidePayment" and choice with value "choice_1", the payment value field has class "paymentValue"):
$(document).ready(function(){ $('.hidePayment input').click(function(){ if($('.hidePayment input[value="choice_1"]').is(':checked')) { $('.paymentValue input').val('0').change(); $('#authorizeNetPaymentBlock').hide(); } }); })
Still, you need to confirm payment when you click submit. It will show "Total: 0" on the confirm dialog.
Replies
I've tried implementing the code above for with a Sandbox account in Forms 11, for above but I'm running into an issue. I do not have any of the Optional Configuration items checked for the account selected in Forms Configuration.
When completing the form where the payment gateway is hidden, the Submit button is not active, or just doesn't work, to submit the form when the Authorize portion is hidden.
Any thoughts