I am using the 'Webform' and 'Authorize.Net Payment Webform' module to collect data and accept donations. I need to provide options for the donation amounts so that the user can select $5, $10, $20, etc... or, enter an "other" amount in a text field.

I have the form and the payment module setup and working perfectly. My issue is that the 'Authorize.Net Payment Webform' module requires you to map the webform fields to corresponding Authorize.net 'required' fields. I am looking for a way to pass the value from the radio button options or the other amount text field if an amount is entered in that field.

I am thinking I can add a statement to the additional validation area that checks to see if there is an 'other amount' value and if so, pass that value to Authorize.net but I am not really sure how to accomplish this.

I have gotten this far:

if ($form_values['submitted']['other_amount']) {
  $not_sure_what_to_put_here = $form_values['submitted']['other_amount'];

  // not sure if I need to do anything else

}

Thanks for any help!

BC

Comments

Canturino’s picture

This is exactly what I need to do as well. Did you ever get a response and finish this code?

Thanks,
DT.