I want to disable the javascript VAT validation because it requires two country letters before the number that are not always needed in real life. I disabled the VAT validation in admin area, but the javascript "syntax" validation is still active. How to disable that?
There is a "VatId" filed in "Forms Editor"(maybe you have to enable EU Vat to get this...). If this field is placed on signup form, then there is a javascript validation in place for this field. I want it to go away
Ok. Edit /amember/library/Am/Invoice/Tax.php find this class: class Am_Form_Brick_VatId extends Am_Form_Brick change this function : PHP: public function insertBrick(HTML_QuickForm2_Container $form) { $el = $form->addText('tax_id')->setLabel(___("EU VAT Id (optional)")) ->addRule('regex', 'Invalid EU VAT Id format', '/^[A-Za-z]{2}[a-zA-Z0-9\s]+$/'); if (!$this->getConfig('dont_validate')) $el->addRule('callback2', '-error-', array($this, 'validate')); } to PHP: public function insertBrick(HTML_QuickForm2_Container $form) { $el = $form->addText('tax_id')->setLabel(___("EU VAT Id (optional)")); if (!$this->getConfig('dont_validate')) $el->addRule('callback2', '-error-', array($this, 'validate')); }
How would i do the same for the "member Profile". The place in membership area where users can change their own informations. It seems the VAT "check" remained there...
This shouldn't happen if you made above cstomization and use vatid brick in profile form. I have tested this on my local installation.
Oh, you a right. I forgot to disable the validation for vatid inside admin area(for the profile form).