[av_codeblock wrapper_element=” wrapper_element_attributes=” codeblock_type=” av_uid=’av-k54fqihf’ custom_class=”]
function click_1f8ed0337ffca8dbdfc5f2ab8d1d34ee( aform_reference ) { var aform = aform_reference; aform['amount'].value = Math.round( aform['amount'].value*Math.pow( 10,2 ) )/Math.pow( 10,2 ); aform['custom_amount'].value = aform['custom_amount'].value.replace( /^\s+|\s+$/g,"" ); if( !aform['custom_amount'].value || 0 === aform['custom_amount'].value.length || /^\s*$/.test( aform['custom_amount'].value ) ) { alert ( 'An amount is required' ); return false; } aform['amount'].value = Math.round( aform['custom_amount'].value*Math.pow( 10,2 ) )/Math.pow( 10,2 ); }
[/av_codeblock]