Updated 15 September 2026
On this page
Description
The JavaScript side of the filter with the same name. It decides the message your customer sees after validating (“Valid Vat Number. Vat reverse charged.” or “Valid Vat Number. No reverse charge.”) and the VAT in the form. Return false to reverse charge valid VAT numbers from your own country as well.
Always add the PHP filter with the same name as well, because the server calculates the VAT again after submitting: gotreu_default_country_reverse_charge.
Parameters
isDefaultCountry | Boolean. True when the validated VAT number is from your default tax country
formId | Int. The ID of the form
Return
Boolean. Return false to apply the reverse charge
Usage
Copy the below code to a HTML field inside your form (wrapped in script tags) or use the Code chest plugin.
<script type="text/javascript">
if ( typeof gform !== "undefined" ) {
gform.addFilter( 'gotreu_default_country_reverse_charge', function( isDefaultCountry, formId ) {
// Reverse charge valid VAT numbers from your own country on form 2.
return parseInt( formId, 10 ) === 2 ? false : isDefaultCountry;
} );
}
</script>
Since
version 1.0.8.3
Didn’t find what you were looking for?
Or contact support and I will help you out.
